1 | //===--- Options.h - Option info & table ------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLVM_CLANG_DRIVER_OPTIONS_H |
10 | #define LLVM_CLANG_DRIVER_OPTIONS_H |
11 | |
12 | #include "llvm/Option/OptTable.h" |
13 | #include "llvm/Option/Option.h" |
14 | |
15 | namespace clang { |
16 | namespace driver { |
17 | |
18 | namespace options { |
19 | /// Flags specifically for clang options. Must not overlap with |
20 | /// llvm::opt::DriverFlag. |
21 | enum ClangFlags { |
22 | NoXarchOption = (1 << 4), |
23 | LinkerInput = (1 << 5), |
24 | NoArgumentUnused = (1 << 6), |
25 | Unsupported = (1 << 7), |
26 | LinkOption = (1 << 8), |
27 | Ignored = (1 << 9), |
28 | TargetSpecific = (1 << 10), |
29 | }; |
30 | |
31 | // Flags specifically for clang option visibility. We alias DefaultVis to |
32 | // ClangOption, because "DefaultVis" is confusing in Options.td, which is used |
33 | // for multiple drivers (clang, cl, flang, etc). |
34 | enum ClangVisibility { |
35 | ClangOption = llvm::opt::DefaultVis, |
36 | CLOption = (1 << 1), |
37 | CC1Option = (1 << 2), |
38 | CC1AsOption = (1 << 3), |
39 | FlangOption = (1 << 4), |
40 | FC1Option = (1 << 5), |
41 | DXCOption = (1 << 6), |
42 | }; |
43 | |
44 | enum ID { |
45 | OPT_INVALID = 0, // This is not an option ID. |
46 | #define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__), |
47 | #include "clang/Driver/Options.inc" |
48 | LastOption |
49 | #undef OPTION |
50 | }; |
51 | } |
52 | |
53 | const llvm::opt::OptTable &getDriverOptTable(); |
54 | } |
55 | } |
56 | |
57 | #endif |
58 | |