clang  13.0.0git
FrontendOptions.h
Go to the documentation of this file.
1 //===- FrontendOptions.h ----------------------------------------*- 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_FRONTEND_FRONTENDOPTIONS_H
10 #define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
11 
17 #include "llvm/ADT/StringRef.h"
18 #include <cassert>
19 #include <map>
20 #include <memory>
21 #include <string>
22 #include <vector>
23 
24 namespace llvm {
25 
26 class MemoryBuffer;
27 
28 } // namespace llvm
29 
30 namespace clang {
31 
32 namespace frontend {
33 
34 enum ActionKind {
35  /// Parse ASTs and list Decl nodes.
37 
38  /// Parse ASTs and dump them.
40 
41  /// Parse ASTs and print them.
43 
44  /// Parse ASTs and view them in Graphviz.
46 
47  /// Dump the compiler configuration.
49 
50  /// Dump out raw tokens.
52 
53  /// Dump out preprocessed tokens.
55 
56  /// Emit a .s file.
58 
59  /// Emit a .bc file.
61 
62  /// Translate input source into HTML.
64 
65  /// Emit a .ll file.
67 
68  /// Generate LLVM IR, but do not emit anything.
70 
71  /// Generate machine code, but don't emit anything.
73 
74  /// Emit a .o file.
76 
77  /// Parse and apply any fixits to the source.
79 
80  /// Generate pre-compiled module from a module map.
82 
83  /// Generate pre-compiled module from a C++ module interface file.
85 
86  /// Generate pre-compiled module from a set of header files.
88 
89  /// Generate pre-compiled header.
91 
92  /// Generate Interface Stub Files.
94 
95  /// Only execute frontend initialization.
97 
98  /// Dump information about a module file.
100 
101  /// Load and verify that a PCH file is usable.
103 
104  /// Parse and perform semantic analysis.
106 
107  /// Run a plugin action, \see ActionName.
109 
110  /// Print the "preamble" of the input file
112 
113  /// -E mode.
115 
116  /// Expand macros but not \#includes.
118 
119  /// ObjC->C Rewriter.
121 
122  /// Rewriter playground
124 
125  /// Run one or more source code analyses.
127 
128  /// Dump template instantiations
130 
131  /// Run migrator.
133 
134  /// Just lex, no output.
136 
137  /// Print the output of the dependency directives source minimizer.
139 };
140 
141 } // namespace frontend
142 
143 /// The kind of a file that we've been handed as an input.
144 class InputKind {
145 private:
146  Language Lang;
147  unsigned Fmt : 3;
148  unsigned Preprocessed : 1;
149 
150 public:
151  /// The input file format.
152  enum Format {
156  };
157 
159  bool PP = false)
160  : Lang(L), Fmt(F), Preprocessed(PP) {}
161 
162  Language getLanguage() const { return static_cast<Language>(Lang); }
163  Format getFormat() const { return static_cast<Format>(Fmt); }
164  bool isPreprocessed() const { return Preprocessed; }
165 
166  /// Is the input kind fully-unknown?
167  bool isUnknown() const { return Lang == Language::Unknown && Fmt == Source; }
168 
169  /// Is the language of the input some dialect of Objective-C?
170  bool isObjectiveC() const {
171  return Lang == Language::ObjC || Lang == Language::ObjCXX;
172  }
173 
175  return InputKind(getLanguage(), getFormat(), true);
176  }
177 
179  return InputKind(getLanguage(), F, isPreprocessed());
180  }
181 };
182 
183 /// An input file for the front end.
185  /// The file name, or "-" to read from standard input.
186  std::string File;
187 
188  /// The input, if it comes from a buffer rather than a file. This object
189  /// does not own the buffer, and the caller is responsible for ensuring
190  /// that it outlives any users.
192 
193  /// The kind of input, e.g., C source, AST file, LLVM IR.
194  InputKind Kind;
195 
196  /// Whether we're dealing with a 'system' input (vs. a 'user' input).
197  bool IsSystem = false;
198 
199 public:
200  FrontendInputFile() = default;
201  FrontendInputFile(StringRef File, InputKind Kind, bool IsSystem = false)
202  : File(File.str()), Kind(Kind), IsSystem(IsSystem) {}
203  FrontendInputFile(llvm::MemoryBufferRef Buffer, InputKind Kind,
204  bool IsSystem = false)
205  : Buffer(Buffer), Kind(Kind), IsSystem(IsSystem) {}
206 
207  InputKind getKind() const { return Kind; }
208  bool isSystem() const { return IsSystem; }
209 
210  bool isEmpty() const { return File.empty() && Buffer == None; }
211  bool isFile() const { return !isBuffer(); }
212  bool isBuffer() const { return Buffer != None; }
213  bool isPreprocessed() const { return Kind.isPreprocessed(); }
214 
215  StringRef getFile() const {
216  assert(isFile());
217  return File;
218  }
219 
220  llvm::MemoryBufferRef getBuffer() const {
221  assert(isBuffer());
222  return *Buffer;
223  }
224 };
225 
226 /// FrontendOptions - Options for controlling the behavior of the frontend.
228 public:
229  /// Disable memory freeing on exit.
230  unsigned DisableFree : 1;
231 
232  /// When generating PCH files, instruct the AST writer to create relocatable
233  /// PCH files.
234  unsigned RelocatablePCH : 1;
235 
236  /// Show the -help text.
237  unsigned ShowHelp : 1;
238 
239  /// Show frontend performance metrics and statistics.
240  unsigned ShowStats : 1;
241 
242  /// print the supported cpus for the current target
243  unsigned PrintSupportedCPUs : 1;
244 
245  /// Output time trace profile.
246  unsigned TimeTrace : 1;
247 
248  /// Show the -version text.
249  unsigned ShowVersion : 1;
250 
251  /// Apply fixes even if there are unfixable errors.
252  unsigned FixWhatYouCan : 1;
253 
254  /// Apply fixes only for warnings.
255  unsigned FixOnlyWarnings : 1;
256 
257  /// Apply fixes and recompile.
258  unsigned FixAndRecompile : 1;
259 
260  /// Apply fixes to temporary files.
261  unsigned FixToTemporaries : 1;
262 
263  /// Emit ARC errors even if the migrator can fix them.
265 
266  /// Skip over function bodies to speed up parsing in cases you do not need
267  /// them (e.g. with code completion).
268  unsigned SkipFunctionBodies : 1;
269 
270  /// Whether we can use the global module index if available.
271  unsigned UseGlobalModuleIndex : 1;
272 
273  /// Whether we can generate the global module index if needed.
275 
276  /// Whether we include declaration dumps in AST dumps.
277  unsigned ASTDumpDecls : 1;
278 
279  /// Whether we deserialize all decls when forming AST dumps.
280  unsigned ASTDumpAll : 1;
281 
282  /// Whether we include lookup table dumps in AST dumps.
283  unsigned ASTDumpLookups : 1;
284 
285  /// Whether we include declaration type dumps in AST dumps.
286  unsigned ASTDumpDeclTypes : 1;
287 
288  /// Whether we are performing an implicit module build.
290 
291  /// Whether we should embed all used files into the PCM file.
292  unsigned ModulesEmbedAllFiles : 1;
293 
294  /// Whether timestamps should be written to the produced PCH file.
295  unsigned IncludeTimestamps : 1;
296 
297  /// Should a temporary file be used during compilation.
298  unsigned UseTemporary : 1;
299 
300  /// When using -emit-module, treat the modulemap as a system module.
301  unsigned IsSystemModule : 1;
302 
303  /// Output (and read) PCM files regardless of compiler errors.
305 
307 
308  /// Specifies the output format of the AST.
310 
311  enum {
317 
318  enum {
320 
321  /// Enable migration to modern ObjC literals.
323 
324  /// Enable migration to modern ObjC subscripting.
326 
327  /// Enable migration to modern ObjC readonly property.
329 
330  /// Enable migration to modern ObjC readwrite property.
332 
333  /// Enable migration to modern ObjC property.
335 
336  /// Enable annotation of ObjCMethods of all kinds.
338 
339  /// Enable migration of ObjC methods to 'instancetype'.
341 
342  /// Enable migration to NS_ENUM/NS_OPTIONS macros.
344 
345  /// Enable migration to add conforming protocols.
347 
348  /// prefer 'atomic' property over 'nonatomic'.
350 
351  /// annotate property with NS_RETURNS_INNER_POINTER
353 
354  /// use NS_NONATOMIC_IOSONLY for property 'atomic' attribute
356 
357  /// Enable inferring NS_DESIGNATED_INITIALIZER for ObjC methods.
359 
360  /// Enable converting setter/getter expressions to property-dot syntx.
362 
370  };
373 
376 
377  /// The input kind, either specified via -x argument or deduced from the input
378  /// file name.
380 
381  /// The input files and their types.
383 
384  /// When the input is a module map, the original module map file from which
385  /// that map was inferred, if any (for umbrella modules).
387 
388  /// The output file, if any.
390 
391  /// If given, the new suffix for fix-it rewritten files.
393 
394  /// If given, filter dumped AST Decl nodes by this substring.
396 
397  /// If given, enable code completion at the provided location.
399 
400  /// The frontend action to perform.
402 
403  /// The name of the action to run when using a plugin action.
405 
406  /// Args to pass to the plugins
407  std::map<std::string, std::vector<std::string>> PluginArgs;
408 
409  /// The list of plugin actions to run in addition to the normal action.
410  std::vector<std::string> AddPluginActions;
411 
412  /// The list of plugins to load.
413  std::vector<std::string> Plugins;
414 
415  /// The list of module file extensions.
416  std::vector<std::shared_ptr<ModuleFileExtension>> ModuleFileExtensions;
417 
418  /// The list of module map files to load before processing the input.
419  std::vector<std::string> ModuleMapFiles;
420 
421  /// The list of additional prebuilt module files to load before
422  /// processing the input.
423  std::vector<std::string> ModuleFiles;
424 
425  /// The list of files to embed into the compiled module file.
426  std::vector<std::string> ModulesEmbedFiles;
427 
428  /// The list of AST files to merge.
429  std::vector<std::string> ASTMergeFiles;
430 
431  /// A list of arguments to forward to LLVM's option processing; this
432  /// should only be used for debugging and experimental features.
433  std::vector<std::string> LLVMArgs;
434 
435  /// File name of the file that will provide record layouts
436  /// (in the format produced by -fdump-record-layouts).
438 
439  /// Auxiliary triple for CUDA/HIP compilation.
441 
442  /// Auxiliary target CPU for CUDA/HIP compilation.
444 
445  /// Auxiliary target features for CUDA/HIP compilation.
447 
448  /// Filename to write statistics to.
450 
451  /// Minimum time granularity (in microseconds) traced by time profiler.
453 
454 public:
465  TimeTraceGranularity(500) {}
466 
467  /// getInputKindForExtension - Return the appropriate input kind for a file
468  /// extension. For example, "c" would return Language::C.
469  ///
470  /// \return The input kind for the extension, or Language::Unknown if the
471  /// extension is not recognized.
472  static InputKind getInputKindForExtension(StringRef Extension);
473 };
474 
475 } // namespace clang
476 
477 #endif // LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
clang::FrontendOptions::ModuleMapFiles
std::vector< std::string > ModuleMapFiles
The list of module map files to load before processing the input.
Definition: FrontendOptions.h:419
clang::FrontendOptions::AddPluginActions
std::vector< std::string > AddPluginActions
The list of plugin actions to run in addition to the normal action.
Definition: FrontendOptions.h:410
clang::FrontendOptions::FixAndRecompile
unsigned FixAndRecompile
Apply fixes and recompile.
Definition: FrontendOptions.h:258
llvm
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion.
Definition: Dominators.h:30
clang::InputKind::isObjectiveC
bool isObjectiveC() const
Is the language of the input some dialect of Objective-C?
Definition: FrontendOptions.h:170
clang::InputKind::Format
Format
The input file format.
Definition: FrontendOptions.h:152
clang::frontend::EmitAssembly
@ EmitAssembly
Emit a .s file.
Definition: FrontendOptions.h:57
clang::DeclaratorContext::File
@ File
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::frontend::GenerateHeaderModule
@ GenerateHeaderModule
Generate pre-compiled module from a set of header files.
Definition: FrontendOptions.h:87
clang::frontend::RewriteTest
@ RewriteTest
Rewriter playground.
Definition: FrontendOptions.h:123
clang::FrontendInputFile::getKind
InputKind getKind() const
Definition: FrontendOptions.h:207
clang::FrontendOptions::ProgramAction
frontend::ActionKind ProgramAction
The frontend action to perform.
Definition: FrontendOptions.h:401
clang::FrontendOptions::ShowStats
unsigned ShowStats
Show frontend performance metrics and statistics.
Definition: FrontendOptions.h:240
llvm::SmallVector
Definition: LLVM.h:38
clang::FrontendOptions::LLVMArgs
std::vector< std::string > LLVMArgs
A list of arguments to forward to LLVM's option processing; this should only be used for debugging an...
Definition: FrontendOptions.h:433
clang::FrontendOptions::PluginArgs
std::map< std::string, std::vector< std::string > > PluginArgs
Args to pass to the plugins.
Definition: FrontendOptions.h:407
clang::FrontendOptions::SkipFunctionBodies
unsigned SkipFunctionBodies
Skip over function bodies to speed up parsing in cases you do not need them (e.g.
Definition: FrontendOptions.h:268
clang::FrontendOptions::ARCMTMigrateReportOut
std::string ARCMTMigrateReportOut
Definition: FrontendOptions.h:375
clang::frontend::ModuleFileInfo
@ ModuleFileInfo
Dump information about a module file.
Definition: FrontendOptions.h:99
clang::frontend::RunPreprocessorOnly
@ RunPreprocessorOnly
Just lex, no output.
Definition: FrontendOptions.h:135
clang::FrontendOptions::ObjCMT_ReturnsInnerPointerProperty
@ ObjCMT_ReturnsInnerPointerProperty
annotate property with NS_RETURNS_INNER_POINTER
Definition: FrontendOptions.h:352
clang::FrontendInputFile
An input file for the front end.
Definition: FrontendOptions.h:184
clang::FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty
@ ObjCMT_NsAtomicIOSOnlyProperty
use NS_NONATOMIC_IOSONLY for property 'atomic' attribute
Definition: FrontendOptions.h:355
clang::FrontendOptions::ARCMT_Migrate
@ ARCMT_Migrate
Definition: FrontendOptions.h:315
clang::ParsedSourceLocation
A source location that has been parsed on the command line.
Definition: CommandLineSourceLoc.h:24
clang::FrontendOptions::ObjCMT_ProtocolConformance
@ ObjCMT_ProtocolConformance
Enable migration to add conforming protocols.
Definition: FrontendOptions.h:346
llvm::Optional< llvm::MemoryBufferRef >
clang::FrontendOptions::TimeTraceGranularity
unsigned TimeTraceGranularity
Minimum time granularity (in microseconds) traced by time profiler.
Definition: FrontendOptions.h:452
clang::frontend::ASTDump
@ ASTDump
Parse ASTs and dump them.
Definition: FrontendOptions.h:39
clang::FrontendOptions::ObjCMT_Literals
@ ObjCMT_Literals
Enable migration to modern ObjC literals.
Definition: FrontendOptions.h:322
clang::InputKind
The kind of a file that we've been handed as an input.
Definition: FrontendOptions.h:144
clang::frontend::VerifyPCH
@ VerifyPCH
Load and verify that a PCH file is usable.
Definition: FrontendOptions.h:102
clang::frontend::PluginAction
@ PluginAction
Run a plugin action,.
Definition: FrontendOptions.h:108
clang::frontend::RewriteObjC
@ RewriteObjC
ObjC->C Rewriter.
Definition: FrontendOptions.h:120
clang::InputKind::Source
@ Source
Definition: FrontendOptions.h:153
clang::FrontendOptions::AuxTargetFeatures
Optional< std::vector< std::string > > AuxTargetFeatures
Auxiliary target features for CUDA/HIP compilation.
Definition: FrontendOptions.h:446
clang::FrontendOptions::PrintSupportedCPUs
unsigned PrintSupportedCPUs
print the supported cpus for the current target
Definition: FrontendOptions.h:243
clang::FrontendInputFile::getFile
StringRef getFile() const
Definition: FrontendOptions.h:215
clang::FrontendOptions::ShowVersion
unsigned ShowVersion
Show the -version text.
Definition: FrontendOptions.h:249
clang::FrontendOptions::Inputs
SmallVector< FrontendInputFile, 0 > Inputs
The input files and their types.
Definition: FrontendOptions.h:382
clang::frontend::GeneratePCH
@ GeneratePCH
Generate pre-compiled header.
Definition: FrontendOptions.h:90
clang::FrontendOptions::OverrideRecordLayoutsFile
std::string OverrideRecordLayoutsFile
File name of the file that will provide record layouts (in the format produced by -fdump-record-layou...
Definition: FrontendOptions.h:437
clang::FrontendOptions::ModulesEmbedAllFiles
unsigned ModulesEmbedAllFiles
Whether we should embed all used files into the PCM file.
Definition: FrontendOptions.h:292
clang::frontend::ASTView
@ ASTView
Parse ASTs and view them in Graphviz.
Definition: FrontendOptions.h:45
clang::FrontendOptions::ShowHelp
unsigned ShowHelp
Show the -help text.
Definition: FrontendOptions.h:237
clang::FrontendOptions::AuxTargetCPU
Optional< std::string > AuxTargetCPU
Auxiliary target CPU for CUDA/HIP compilation.
Definition: FrontendOptions.h:443
clang::FrontendOptions::ASTDumpFormat
ASTDumpOutputFormat ASTDumpFormat
Specifies the output format of the AST.
Definition: FrontendOptions.h:309
clang::frontend::ASTPrint
@ ASTPrint
Parse ASTs and print them.
Definition: FrontendOptions.h:42
clang::FrontendOptions::FrontendOptions
FrontendOptions()
Definition: FrontendOptions.h:455
clang::FrontendOptions::ASTDumpDecls
unsigned ASTDumpDecls
Whether we include declaration dumps in AST dumps.
Definition: FrontendOptions.h:277
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile(StringRef File, InputKind Kind, bool IsSystem=false)
Definition: FrontendOptions.h:201
clang::FrontendInputFile::getBuffer
llvm::MemoryBufferRef getBuffer() const
Definition: FrontendOptions.h:220
clang::frontend::RunAnalysis
@ RunAnalysis
Run one or more source code analyses.
Definition: FrontendOptions.h:126
clang::FrontendOptions::ObjCMT_Property
@ ObjCMT_Property
Enable migration to modern ObjC property.
Definition: FrontendOptions.h:334
clang::frontend::EmitObj
@ EmitObj
Emit a .o file.
Definition: FrontendOptions.h:75
clang::FrontendOptions::getInputKindForExtension
static InputKind getInputKindForExtension(StringRef Extension)
getInputKindForExtension - Return the appropriate input kind for a file extension.
Definition: FrontendOptions.cpp:15
clang::frontend::ActionKind
ActionKind
Definition: FrontendOptions.h:34
CodeCompleteOptions.h
clang::FrontendOptions::UseTemporary
unsigned UseTemporary
Should a temporary file be used during compilation.
Definition: FrontendOptions.h:298
clang::FrontendOptions::OutputFile
std::string OutputFile
The output file, if any.
Definition: FrontendOptions.h:389
clang::FrontendOptions::ASTDumpFilter
std::string ASTDumpFilter
If given, filter dumped AST Decl nodes by this substring.
Definition: FrontendOptions.h:395
clang::FrontendOptions::AuxTriple
std::string AuxTriple
Auxiliary triple for CUDA/HIP compilation.
Definition: FrontendOptions.h:440
clang::FrontendOptions::ARCMT_Modify
@ ARCMT_Modify
Definition: FrontendOptions.h:314
clang::frontend::ParseSyntaxOnly
@ ParseSyntaxOnly
Parse and perform semantic analysis.
Definition: FrontendOptions.h:105
clang::ASTDumpOutputFormat
ASTDumpOutputFormat
Used to specify the format for printing AST dump information.
Definition: ASTDumperUtils.h:21
clang::FrontendOptions::ARCMT_Check
@ ARCMT_Check
Definition: FrontendOptions.h:313
clang::FrontendOptions
FrontendOptions - Options for controlling the behavior of the frontend.
Definition: FrontendOptions.h:227
ASTDumperUtils.h
clang::frontend::ASTDeclList
@ ASTDeclList
Parse ASTs and list Decl nodes.
Definition: FrontendOptions.h:36
clang::InputKind::isUnknown
bool isUnknown() const
Is the input kind fully-unknown?
Definition: FrontendOptions.h:167
clang::frontend::DumpRawTokens
@ DumpRawTokens
Dump out raw tokens.
Definition: FrontendOptions.h:51
clang::InputKind::getLanguage
Language getLanguage() const
Definition: FrontendOptions.h:162
clang::frontend::EmitLLVM
@ EmitLLVM
Emit a .ll file.
Definition: FrontendOptions.h:66
clang::FrontendOptions::ASTDumpDeclTypes
unsigned ASTDumpDeclTypes
Whether we include declaration type dumps in AST dumps.
Definition: FrontendOptions.h:286
clang::FrontendInputFile::isBuffer
bool isBuffer() const
Definition: FrontendOptions.h:212
clang::InputKind::Precompiled
@ Precompiled
Definition: FrontendOptions.h:155
clang::FrontendOptions::ObjCMT_Annotation
@ ObjCMT_Annotation
Enable annotation of ObjCMethods of all kinds.
Definition: FrontendOptions.h:337
clang::FrontendOptions::StatsFile
std::string StatsFile
Filename to write statistics to.
Definition: FrontendOptions.h:449
clang::FrontendOptions::ASTDumpAll
unsigned ASTDumpAll
Whether we deserialize all decls when forming AST dumps.
Definition: FrontendOptions.h:280
clang::InputKind::getPreprocessed
InputKind getPreprocessed() const
Definition: FrontendOptions.h:174
clang::FrontendOptions::ObjCMTAction
unsigned ObjCMTAction
Definition: FrontendOptions.h:371
clang::FrontendInputFile::isFile
bool isFile() const
Definition: FrontendOptions.h:211
clang::FrontendOptions::FixToTemporaries
unsigned FixToTemporaries
Apply fixes to temporary files.
Definition: FrontendOptions.h:261
clang::frontend::PrintDependencyDirectivesSourceMinimizerOutput
@ PrintDependencyDirectivesSourceMinimizerOutput
Print the output of the dependency directives source minimizer.
Definition: FrontendOptions.h:138
clang::FrontendOptions::ASTMergeFiles
std::vector< std::string > ASTMergeFiles
The list of AST files to merge.
Definition: FrontendOptions.h:429
clang::frontend::EmitHTML
@ EmitHTML
Translate input source into HTML.
Definition: FrontendOptions.h:63
clang::FrontendOptions::DashX
InputKind DashX
The input kind, either specified via -x argument or deduced from the input file name.
Definition: FrontendOptions.h:379
clang::frontend::RewriteMacros
@ RewriteMacros
Expand macros but not #includes.
Definition: FrontendOptions.h:117
clang::FrontendOptions::ModulesEmbedFiles
std::vector< std::string > ModulesEmbedFiles
The list of files to embed into the compiled module file.
Definition: FrontendOptions.h:426
clang::FrontendOptions::UseGlobalModuleIndex
unsigned UseGlobalModuleIndex
Whether we can use the global module index if available.
Definition: FrontendOptions.h:271
clang::FrontendOptions::ObjCMT_ReadwriteProperty
@ ObjCMT_ReadwriteProperty
Enable migration to modern ObjC readwrite property.
Definition: FrontendOptions.h:331
clang::FrontendOptions::AllowPCMWithCompilerErrors
unsigned AllowPCMWithCompilerErrors
Output (and read) PCM files regardless of compiler errors.
Definition: FrontendOptions.h:304
clang::FrontendOptions::ASTDumpLookups
unsigned ASTDumpLookups
Whether we include lookup table dumps in AST dumps.
Definition: FrontendOptions.h:283
clang::FrontendOptions::FixOnlyWarnings
unsigned FixOnlyWarnings
Apply fixes only for warnings.
Definition: FrontendOptions.h:255
clang::InputKind::getFormat
Format getFormat() const
Definition: FrontendOptions.h:163
clang::FrontendInputFile::isSystem
bool isSystem() const
Definition: FrontendOptions.h:208
clang::FrontendOptions::ObjCMT_DesignatedInitializer
@ ObjCMT_DesignatedInitializer
Enable inferring NS_DESIGNATED_INITIALIZER for ObjC methods.
Definition: FrontendOptions.h:358
clang::FrontendOptions::TimeTrace
unsigned TimeTrace
Output time trace profile.
Definition: FrontendOptions.h:246
clang::FrontendOptions::ModuleFileExtensions
std::vector< std::shared_ptr< ModuleFileExtension > > ModuleFileExtensions
The list of module file extensions.
Definition: FrontendOptions.h:416
clang::InputKind::ModuleMap
@ ModuleMap
Definition: FrontendOptions.h:154
clang::FrontendOptions::ObjCMT_NsMacros
@ ObjCMT_NsMacros
Enable migration to NS_ENUM/NS_OPTIONS macros.
Definition: FrontendOptions.h:343
clang::frontend::EmitBC
@ EmitBC
Emit a .bc file.
Definition: FrontendOptions.h:60
clang::FrontendInputFile::isPreprocessed
bool isPreprocessed() const
Definition: FrontendOptions.h:213
clang::FrontendOptions::ARCMTAction
enum clang::FrontendOptions::@185 ARCMTAction
clang::FrontendOptions::CodeCompleteOpts
CodeCompleteOptions CodeCompleteOpts
Definition: FrontendOptions.h:306
false
#define false
Definition: stdbool.h:17
clang::Language
Language
The language for the input, used to select and validate the language standard and possible actions.
Definition: LangStandard.h:19
clang::FrontendOptions::ObjCMT_PropertyDotSyntax
@ ObjCMT_PropertyDotSyntax
Enable converting setter/getter expressions to property-dot syntx.
Definition: FrontendOptions.h:361
clang::FrontendOptions::IsSystemModule
unsigned IsSystemModule
When using -emit-module, treat the modulemap as a system module.
Definition: FrontendOptions.h:301
clang::FrontendOptions::ObjCMTWhiteListPath
std::string ObjCMTWhiteListPath
Definition: FrontendOptions.h:372
LangStandard.h
clang::frontend::GenerateModule
@ GenerateModule
Generate pre-compiled module from a module map.
Definition: FrontendOptions.h:81
clang::FrontendOptions::ObjCMT_Instancetype
@ ObjCMT_Instancetype
Enable migration of ObjC methods to 'instancetype'.
Definition: FrontendOptions.h:340
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile(llvm::MemoryBufferRef Buffer, InputKind Kind, bool IsSystem=false)
Definition: FrontendOptions.h:203
clang::FrontendOptions::FixItSuffix
std::string FixItSuffix
If given, the new suffix for fix-it rewritten files.
Definition: FrontendOptions.h:392
clang::Language::ObjCXX
@ ObjCXX
clang::frontend::FixIt
@ FixIt
Parse and apply any fixits to the source.
Definition: FrontendOptions.h:78
clang::FrontendOptions::ObjCMT_MigrateDecls
@ ObjCMT_MigrateDecls
Definition: FrontendOptions.h:363
clang::FrontendOptions::Plugins
std::vector< std::string > Plugins
The list of plugins to load.
Definition: FrontendOptions.h:413
clang::FrontendOptions::ObjCMT_ReadonlyProperty
@ ObjCMT_ReadonlyProperty
Enable migration to modern ObjC readonly property.
Definition: FrontendOptions.h:328
clang::Language::ObjC
@ ObjC
clang::FrontendOptions::ActionName
std::string ActionName
The name of the action to run when using a plugin action.
Definition: FrontendOptions.h:404
clang::FrontendOptions::ObjCMT_None
@ ObjCMT_None
Definition: FrontendOptions.h:319
clang::FrontendOptions::GenerateGlobalModuleIndex
unsigned GenerateGlobalModuleIndex
Whether we can generate the global module index if needed.
Definition: FrontendOptions.h:274
ModuleFileExtension.h
clang::FrontendOptions::BuildingImplicitModule
unsigned BuildingImplicitModule
Whether we are performing an implicit module build.
Definition: FrontendOptions.h:289
clang::FrontendOptions::ARCMTMigrateEmitARCErrors
unsigned ARCMTMigrateEmitARCErrors
Emit ARC errors even if the migrator can fix them.
Definition: FrontendOptions.h:264
clang::FrontendInputFile::isEmpty
bool isEmpty() const
Definition: FrontendOptions.h:210
clang::FrontendOptions::ARCMT_None
@ ARCMT_None
Definition: FrontendOptions.h:312
clang::FrontendOptions::ModuleFiles
std::vector< std::string > ModuleFiles
The list of additional prebuilt module files to load before processing the input.
Definition: FrontendOptions.h:423
clang::FrontendOptions::OriginalModuleMap
std::string OriginalModuleMap
When the input is a module map, the original module map file from which that map was inferred,...
Definition: FrontendOptions.h:386
clang
Dataflow Directional Tag Classes.
Definition: CalledOnceCheck.h:17
clang::frontend::DumpTokens
@ DumpTokens
Dump out preprocessed tokens.
Definition: FrontendOptions.h:54
clang::ADOF_Default
@ ADOF_Default
Definition: ASTDumperUtils.h:22
clang::FrontendOptions::IncludeTimestamps
unsigned IncludeTimestamps
Whether timestamps should be written to the produced PCH file.
Definition: FrontendOptions.h:295
clang::frontend::DumpCompilerOptions
@ DumpCompilerOptions
Dump the compiler configuration.
Definition: FrontendOptions.h:48
clang::InputKind::InputKind
constexpr InputKind(Language L=Language::Unknown, Format F=Source, bool PP=false)
Definition: FrontendOptions.h:158
clang::CodeCompleteOptions
Options controlling the behavior of code completion.
Definition: CodeCompleteOptions.h:15
clang::FrontendOptions::MTMigrateDir
std::string MTMigrateDir
Definition: FrontendOptions.h:374
clang::FrontendOptions::FixWhatYouCan
unsigned FixWhatYouCan
Apply fixes even if there are unfixable errors.
Definition: FrontendOptions.h:252
clang::Language::Unknown
@ Unknown
clang::FrontendOptions::RelocatablePCH
unsigned RelocatablePCH
When generating PCH files, instruct the AST writer to create relocatable PCH files.
Definition: FrontendOptions.h:234
clang::FrontendOptions::DisableFree
unsigned DisableFree
Disable memory freeing on exit.
Definition: FrontendOptions.h:230
clang::frontend::PrintPreprocessedInput
@ PrintPreprocessedInput
-E mode.
Definition: FrontendOptions.h:114
true
#define true
Definition: stdbool.h:16
clang::FrontendOptions::ObjCMT_Subscripting
@ ObjCMT_Subscripting
Enable migration to modern ObjC subscripting.
Definition: FrontendOptions.h:325
clang::frontend::EmitLLVMOnly
@ EmitLLVMOnly
Generate LLVM IR, but do not emit anything.
Definition: FrontendOptions.h:69
clang::frontend::MigrateSource
@ MigrateSource
Run migrator.
Definition: FrontendOptions.h:132
clang::InputKind::withFormat
InputKind withFormat(Format F) const
Definition: FrontendOptions.h:178
clang::frontend::GenerateInterfaceStubs
@ GenerateInterfaceStubs
Generate Interface Stub Files.
Definition: FrontendOptions.h:93
clang::FrontendOptions::ObjCMT_AtomicProperty
@ ObjCMT_AtomicProperty
prefer 'atomic' property over 'nonatomic'.
Definition: FrontendOptions.h:349
clang::InputKind::isPreprocessed
bool isPreprocessed() const
Definition: FrontendOptions.h:164
clang::frontend::InitOnly
@ InitOnly
Only execute frontend initialization.
Definition: FrontendOptions.h:96
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile()=default
CommandLineSourceLoc.h
clang::FrontendOptions::CodeCompletionAt
ParsedSourceLocation CodeCompletionAt
If given, enable code completion at the provided location.
Definition: FrontendOptions.h:398
clang::FrontendOptions::ObjCMT_MigrateAll
@ ObjCMT_MigrateAll
Definition: FrontendOptions.h:368
clang::frontend::PrintPreamble
@ PrintPreamble
Print the "preamble" of the input file.
Definition: FrontendOptions.h:111
clang::frontend::TemplightDump
@ TemplightDump
Dump template instantiations.
Definition: FrontendOptions.h:129
clang::frontend::GenerateModuleInterface
@ GenerateModuleInterface
Generate pre-compiled module from a C++ module interface file.
Definition: FrontendOptions.h:84
clang::frontend::EmitCodeGenOnly
@ EmitCodeGenOnly
Generate machine code, but don't emit anything.
Definition: FrontendOptions.h:72