clang  19.0.0git
Options.h
Go to the documentation of this file.
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  Deprecated = (1 << 11),
30 };
31 
32 // Flags specifically for clang option visibility. We alias DefaultVis to
33 // ClangOption, because "DefaultVis" is confusing in Options.td, which is used
34 // for multiple drivers (clang, cl, flang, etc).
36  ClangOption = llvm::opt::DefaultVis,
37  CLOption = (1 << 1),
38  CC1Option = (1 << 2),
39  CC1AsOption = (1 << 3),
40  FlangOption = (1 << 4),
41  FC1Option = (1 << 5),
42  DXCOption = (1 << 6),
43 };
44 
45 enum ID {
46  OPT_INVALID = 0, // This is not an option ID.
47 #define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__),
48 #include "clang/Driver/Options.inc"
50 #undef OPTION
51  };
52 }
53 
54 const llvm::opt::OptTable &getDriverOptTable();
55 }
56 }
57 
58 #endif
ClangFlags
Flags specifically for clang options.
Definition: Options.h:21
const llvm::opt::OptTable & getDriverOptTable()
The JSON file list parser is used to communicate input to InstallAPI.