9 #ifndef LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H 10 #define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H 17 #include "llvm/ADT/StringRef.h" 21 #include <unordered_map> 148 unsigned Preprocessed : 1;
160 : Lang(L), Fmt(F), Preprocessed(PP) {}
175 return InputKind(getLanguage(), getFormat(),
true);
179 return InputKind(getLanguage(), F, isPreprocessed());
191 const llvm::MemoryBuffer *Buffer =
nullptr;
197 bool IsSystem =
false;
202 : File(File.str()), Kind(Kind), IsSystem(IsSystem) {}
204 bool IsSystem =
false)
205 : Buffer(Buffer), Kind(Kind), IsSystem(IsSystem) {}
210 bool isEmpty()
const {
return File.empty() && Buffer ==
nullptr; }
211 bool isFile()
const {
return !isBuffer(); }
212 bool isBuffer()
const {
return Buffer !=
nullptr; }
310 } ARCMTAction = ARCMT_None;
316 ObjCMT_Literals = 0x1,
319 ObjCMT_Subscripting = 0x2,
322 ObjCMT_ReadonlyProperty = 0x4,
325 ObjCMT_ReadwriteProperty = 0x8,
328 ObjCMT_Property = (ObjCMT_ReadonlyProperty | ObjCMT_ReadwriteProperty),
331 ObjCMT_Annotation = 0x10,
334 ObjCMT_Instancetype = 0x20,
337 ObjCMT_NsMacros = 0x40,
340 ObjCMT_ProtocolConformance = 0x80,
343 ObjCMT_AtomicProperty = 0x100,
346 ObjCMT_ReturnsInnerPointerProperty = 0x200,
349 ObjCMT_NsAtomicIOSOnlyProperty = 0x400,
352 ObjCMT_DesignatedInitializer = 0x800,
355 ObjCMT_PropertyDotSyntax = 0x1000,
357 ObjCMT_MigrateDecls = (ObjCMT_ReadonlyProperty | ObjCMT_ReadwriteProperty |
358 ObjCMT_Annotation | ObjCMT_Instancetype |
359 ObjCMT_NsMacros | ObjCMT_ProtocolConformance |
360 ObjCMT_NsAtomicIOSOnlyProperty |
361 ObjCMT_DesignatedInitializer),
362 ObjCMT_MigrateAll = (ObjCMT_Literals | ObjCMT_Subscripting |
363 ObjCMT_MigrateDecls | ObjCMT_PropertyDotSyntax)
365 unsigned ObjCMTAction = ObjCMT_None;
397 std::unordered_map<std::string,std::vector<std::string>>
PluginArgs;
443 FixAndRecompile(
false), FixToTemporaries(
false),
444 ARCMTMigrateEmitARCErrors(
false), SkipFunctionBodies(
false),
445 UseGlobalModuleIndex(
true), GenerateGlobalModuleIndex(
true),
447 BuildingImplicitModule(
false), ModulesEmbedAllFiles(
false),
448 IncludeTimestamps(
true), UseTemporary(
true), TimeTraceGranularity(500) {}
455 static InputKind getInputKindForExtension(StringRef Extension);
460 #endif // LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H Expand macros but not #includes.
std::string OutputFile
The output file, if any.
std::string OriginalModuleMap
When the input is a module map, the original module map file from which that map was inferred...
std::string ObjCMTWhiteListPath
Generate pre-compiled module from a module map.
Print the output of the dependency directives source minimizer.
Parse and perform semantic analysis.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
Parse ASTs and print them.
std::string ASTDumpFilter
If given, filter dumped AST Decl nodes by this substring.
std::string FixItSuffix
If given, the new suffix for fix-it rewritten files.
unsigned TimeTraceGranularity
Minimum time granularity (in microseconds) traced by time profiler.
Parse and apply any fixits to the source.
unsigned TimeTrace
Output time trace profile.
Translate input source into HTML.
A source location that has been parsed on the command line.
std::vector< std::string > ASTMergeFiles
The list of AST files to merge.
unsigned BuildingImplicitModule
Whether we are performing an implicit module build.
std::vector< std::string > ModulesEmbedFiles
The list of files to embed into the compiled module file.
unsigned RelocatablePCH
When generating PCH files, instruct the AST writer to create relocatable PCH files.
Generate LLVM IR, but do not emit anything.
unsigned ShowStats
Show frontend performance metrics and statistics.
SmallVector< FrontendInputFile, 0 > Inputs
The input files and their types.
unsigned FixWhatYouCan
Apply fixes even if there are unfixable errors.
unsigned SkipFunctionBodies
Skip over function bodies to speed up parsing in cases you do not need them (e.g. ...
unsigned FixAndRecompile
Apply fixes and recompile.
Language
The language for the input, used to select and validate the language standard and possible actions...
Dump the compiler configuration.
Dump template instantiations.
Dump out preprocessed tokens.
unsigned ASTDumpAll
Whether we deserialize all decls when forming AST dumps.
Generate pre-compiled module from a C++ module interface file.
std::vector< std::string > Plugins
The list of plugins to load.
ASTDumpOutputFormat
Used to specify the format for printing AST dump information.
unsigned ShowTimers
Show timers for individual actions.
Generate Interface Stub Files.
Only execute frontend initialization.
Print the "preamble" of the input file.
unsigned ModulesEmbedAllFiles
Whether we should embed all used files into the PCM file.
unsigned FixOnlyWarnings
Apply fixes only for warnings.
std::string AuxTriple
Auxiliary triple for CUDA compilation.
unsigned ARCMTMigrateEmitARCErrors
Emit ARC errors even if the migrator can fix them.
Generate machine code, but don't emit anything.
std::vector< std::string > ModuleFiles
The list of additional prebuilt module files to load before processing the input. ...
ParsedSourceLocation CodeCompletionAt
If given, enable code completion at the provided location.
unsigned IncludeTimestamps
Whether timestamps should be written to the produced PCH file.
Parse ASTs and view them in Graphviz.
Parse ASTs and list Decl nodes.
std::unordered_map< std::string, std::vector< std::string > > PluginArgs
Args to pass to the plugins.
unsigned ASTDumpLookups
Whether we include lookup table dumps in AST dumps.
Load and verify that a PCH file is usable.
unsigned ShowVersion
Show the -version text.
unsigned GenerateGlobalModuleIndex
Whether we can generate the global module index if needed.
unsigned ShowHelp
Show the -help text.
std::string OverrideRecordLayoutsFile
File name of the file that will provide record layouts (in the format produced by -fdump-record-layou...
unsigned FixToTemporaries
Apply fixes to temporary files.
Options controlling the behavior of code completion.
Dataflow Directional Tag Classes.
std::string ARCMTMigrateReportOut
unsigned UseGlobalModuleIndex
Whether we can use the global module index if available.
FrontendOptions - Options for controlling the behavior of the frontend.
std::string StatsFile
Filename to write statistics to.
Parse ASTs and dump them.
unsigned UseTemporary
Should a temporary file be used during compilation.
std::vector< std::shared_ptr< ModuleFileExtension > > ModuleFileExtensions
The list of module file extensions.
CodeCompleteOptions CodeCompleteOpts
std::vector< std::string > AddPluginActions
The list of plugin actions to run in addition to the normal action.
unsigned DisableFree
Disable memory freeing on exit.
Generate pre-compiled header.
Generate pre-compiled module from a set of header files.
unsigned PrintSupportedCPUs
print the supported cpus for the current target
unsigned ASTDumpDecls
Whether we include declaration dumps in AST dumps.
std::string ActionName
The name of the action to run when using a plugin action.
Run one or more source code analyses.
std::vector< std::string > LLVMArgs
A list of arguments to forward to LLVM's option processing; this should only be used for debugging an...
Dump information about a module file.
std::vector< std::string > ModuleMapFiles
The list of module map files to load before processing the input.