clang: clang::FrontendOptions Class Reference (original) (raw)
FrontendOptions - Options for controlling the behavior of the frontend. More...
#include "[clang/Frontend/FrontendOptions.h](FrontendOptions%5F8h%5Fsource.html)"
Public Types | |
---|---|
enum | { ARCMT_None, ARCMT_Check, ARCMT_Modify, ARCMT_Migrate } |
enum | { ObjCMT_None = 0 , ObjCMT_Literals = 0x1 , ObjCMT_Subscripting = 0x2 , ObjCMT_ReadonlyProperty = 0x4 , ObjCMT_ReadwriteProperty = 0x8 , ObjCMT_Property = (ObjCMT_ReadonlyProperty | ObjCMT_ReadwriteProperty) , ObjCMT_Annotation = 0x10 , ObjCMT_Instancetype = 0x20 , ObjCMT_NsMacros = 0x40 , ObjCMT_ProtocolConformance = 0x80 , ObjCMT_AtomicProperty = 0x100 , ObjCMT_ReturnsInnerPointerProperty = 0x200 , ObjCMT_NsAtomicIOSOnlyProperty = 0x400 , ObjCMT_DesignatedInitializer = 0x800 , ObjCMT_PropertyDotSyntax = 0x1000 , ObjCMT_MigrateDecls, ObjCMT_MigrateAll } |
Static Public Member Functions | |
---|---|
static InputKind | getInputKindForExtension (StringRef Extension) |
getInputKindForExtension - Return the appropriate input kind for a file extension. | |
Public Attributes | |
---|---|
unsigned | DisableFree: 1 |
Disable memory freeing on exit. | |
unsigned | RelocatablePCH: 1 |
When generating PCH files, instruct the AST writer to create relocatable PCH files. | |
unsigned | ShowHelp: 1 |
Show the -help text. | |
unsigned | ShowStats: 1 |
Show frontend performance metrics and statistics. | |
unsigned | AppendStats: 1 |
unsigned | PrintSupportedCPUs: 1 |
print the supported cpus for the current target | |
unsigned | PrintSupportedExtensions: 1 |
Print the supported extensions for the current target. | |
unsigned | PrintEnabledExtensions: 1 |
Print the extensions enabled for the current target. | |
unsigned | ShowVersion: 1 |
Show the -version text. | |
unsigned | FixWhatYouCan: 1 |
Apply fixes even if there are unfixable errors. | |
unsigned | FixOnlyWarnings: 1 |
Apply fixes only for warnings. | |
unsigned | FixAndRecompile: 1 |
Apply fixes and recompile. | |
unsigned | FixToTemporaries: 1 |
Apply fixes to temporary files. | |
unsigned | ARCMTMigrateEmitARCErrors: 1 |
Emit ARC errors even if the migrator can fix them. | |
unsigned | SkipFunctionBodies: 1 |
Skip over function bodies to speed up parsing in cases you do not need them (e.g. | |
unsigned | UseGlobalModuleIndex: 1 |
Whether we can use the global module index if available. | |
unsigned | GenerateGlobalModuleIndex: 1 |
Whether we can generate the global module index if needed. | |
unsigned | ASTDumpDecls: 1 |
Whether we include declaration dumps in AST dumps. | |
unsigned | ASTDumpAll: 1 |
Whether we deserialize all decls when forming AST dumps. | |
unsigned | ASTDumpLookups: 1 |
Whether we include lookup table dumps in AST dumps. | |
unsigned | ASTDumpDeclTypes: 1 |
Whether we include declaration type dumps in AST dumps. | |
unsigned | BuildingImplicitModule: 1 |
Whether we are performing an implicit module build. | |
unsigned | BuildingImplicitModuleUsesLock: 1 |
Whether to use a filesystem lock when building implicit modules. | |
unsigned | ModulesEmbedAllFiles: 1 |
Whether we should embed all used files into the PCM file. | |
unsigned | IncludeTimestamps: 1 |
Whether timestamps should be written to the produced PCH file. | |
unsigned | UseTemporary: 1 |
Should a temporary file be used during compilation. | |
unsigned | IsSystemModule: 1 |
When using -emit-module, treat the modulemap as a system module. | |
unsigned | AllowPCMWithCompilerErrors: 1 |
Output (and read) PCM files regardless of compiler errors. | |
unsigned | ModulesShareFileManager: 1 |
Whether to share the FileManager when building modules. | |
unsigned | EmitSymbolGraph: 1 |
Whether to emit symbol graph files as a side effect of compilation. | |
unsigned | EmitExtensionSymbolGraphs: 1 |
Whether to emit additional symbol graphs for extended modules. | |
unsigned | EmitSymbolGraphSymbolLabelsForTesting: 1 |
Whether to emit symbol labels for testing in generated symbol graphs. | |
unsigned | EmitPrettySymbolGraphs: 1 |
Whether to emit symbol labels for testing in generated symbol graphs. | |
unsigned | GenReducedBMI: 1 |
Whether to generate reduced BMI for C++20 named modules. | |
unsigned | UseClangIRPipeline: 1 |
Use Clang IR pipeline to emit code. | |
CodeCompleteOptions | CodeCompleteOpts |
ASTDumpOutputFormat | ASTDumpFormat = ADOF_Default |
Specifies the output format of the AST. | |
enum clang::FrontendOptions:: { ... } | ARCMTAction = ARCMT_None |
unsigned | ObjCMTAction = ObjCMT_None |
std::string | ObjCMTAllowListPath |
std::string | MTMigrateDir |
std::string | ARCMTMigrateReportOut |
InputKind | DashX |
The input kind, either specified via -x argument or deduced from the input file name. | |
SmallVector< FrontendInputFile, 0 > | Inputs |
The input files and their types. | |
std::string | OriginalModuleMap |
When the input is a module map, the original module map file from which that map was inferred, if any (for umbrella modules). | |
std::string | OutputFile |
The output file, if any. | |
std::string | FixItSuffix |
If given, the new suffix for fix-it rewritten files. | |
std::string | ASTDumpFilter |
If given, filter dumped AST Decl nodes by this substring. | |
ParsedSourceLocation | CodeCompletionAt |
If given, enable code completion at the provided location. | |
frontend::ActionKind | ProgramAction = frontend::ParseSyntaxOnly |
The frontend action to perform. | |
std::string | ActionName |
The name of the action to run when using a plugin action. | |
std::string | ProductName |
The name of the product the input files belong too. | |
std::vector< std::string > | ExtractAPIIgnoresFileList |
std::string | SymbolGraphOutputDir |
std::map< std::string, std::vector< std::string > > | PluginArgs |
Args to pass to the plugins. | |
std::vector< std::string > | AddPluginActions |
The list of plugin actions to run in addition to the normal action. | |
std::vector< std::string > | Plugins |
The list of plugins to load. | |
std::vector< std::shared_ptr< ModuleFileExtension > > | ModuleFileExtensions |
The list of module file extensions. | |
std::vector< std::string > | ModuleMapFiles |
The list of module map files to load before processing the input. | |
std::vector< std::string > | ModuleFiles |
The list of additional prebuilt module files to load before processing the input. | |
std::vector< std::string > | ModulesEmbedFiles |
The list of files to embed into the compiled module file. | |
std::vector< std::string > | ASTMergeFiles |
The list of AST files to merge. | |
std::vector< std::string > | LLVMArgs |
A list of arguments to forward to LLVM's option processing; this should only be used for debugging and experimental features. | |
std::string | OverrideRecordLayoutsFile |
File name of the file that will provide record layouts (in the format produced by -fdump-record-layouts). | |
std::string | AuxTriple |
Auxiliary triple for CUDA/HIP compilation. | |
std::optional< std::string > | AuxTargetCPU |
Auxiliary target CPU for CUDA/HIP compilation. | |
std::optional< std::vector< std::string > > | AuxTargetFeatures |
Auxiliary target features for CUDA/HIP compilation. | |
std::string | StatsFile |
Filename to write statistics to. | |
unsigned | TimeTraceGranularity |
Minimum time granularity (in microseconds) traced by time profiler. | |
unsigned | TimeTraceVerbose: 1 |
Make time trace capture verbose event details (e.g. | |
std::string | TimeTracePath |
Path which stores the output files for -ftime-trace. | |
std::string | ModuleOutputPath |
Output Path for module output file. | |
FrontendOptions - Options for controlling the behavior of the frontend.
Definition at line 279 of file FrontendOptions.h.
◆ anonymous enum
Enumerator |
---|
ARCMT_None |
ARCMT_Check |
ARCMT_Modify |
ARCMT_Migrate |
Definition at line 427 of file FrontendOptions.h.
◆ anonymous enum
Enumerator | |
---|---|
ObjCMT_None | |
ObjCMT_Literals | Enable migration to modern ObjC literals. |
ObjCMT_Subscripting | Enable migration to modern ObjC subscripting. |
ObjCMT_ReadonlyProperty | Enable migration to modern ObjC readonly property. |
ObjCMT_ReadwriteProperty | Enable migration to modern ObjC readwrite property. |
ObjCMT_Property | Enable migration to modern ObjC property. |
ObjCMT_Annotation | Enable annotation of ObjCMethods of all kinds. |
ObjCMT_Instancetype | Enable migration of ObjC methods to 'instancetype'. |
ObjCMT_NsMacros | Enable migration to NS_ENUM/NS_OPTIONS macros. |
ObjCMT_ProtocolConformance | Enable migration to add conforming protocols. |
ObjCMT_AtomicProperty | prefer 'atomic' property over 'nonatomic'. |
ObjCMT_ReturnsInnerPointerProperty | annotate property with NS_RETURNS_INNER_POINTER |
ObjCMT_NsAtomicIOSOnlyProperty | use NS_NONATOMIC_IOSONLY for property 'atomic' attribute |
ObjCMT_DesignatedInitializer | Enable inferring NS_DESIGNATED_INITIALIZER for ObjC methods. |
ObjCMT_PropertyDotSyntax | Enable converting setter/getter expressions to property-dot syntx. |
ObjCMT_MigrateDecls | |
ObjCMT_MigrateAll |
Definition at line 434 of file FrontendOptions.h.
clang::FrontendOptions::FrontendOptions ( ) | inline |
---|
◆ getInputKindForExtension()
InputKind FrontendOptions::getInputKindForExtension ( StringRef Extension) | static |
---|
getInputKindForExtension - Return the appropriate input kind for a file extension.
For example, "c" would return Language::C.
Returns
The input kind for the extension, or Language::Unknown if the extension is not recognized.
Definition at line 15 of file FrontendOptions.cpp.
References clang::Asm, clang::C, clang::CIR, clang::CUDA, clang::CXX, clang::HIP, clang::HLSL, clang::LLVM_IR, clang::ObjC, clang::ObjCXX, clang::OpenCL, clang::OpenCLCXX, clang::InputKind::Precompiled, and clang::Unknown.
Referenced by ParseFrontendArgs().
◆ ActionName
std::string clang::FrontendOptions::ActionName
◆ AddPluginActions
std::vectorstd::string clang::FrontendOptions::AddPluginActions
The list of plugin actions to run in addition to the normal action.
Definition at line 539 of file FrontendOptions.h.
◆ AllowPCMWithCompilerErrors
unsigned clang::FrontendOptions::AllowPCMWithCompilerErrors
◆ AppendStats
unsigned clang::FrontendOptions::AppendStats
◆
enum { ... } clang::FrontendOptions::ARCMTAction
◆ ARCMTMigrateEmitARCErrors
unsigned clang::FrontendOptions::ARCMTMigrateEmitARCErrors
◆ ARCMTMigrateReportOut
std::string clang::FrontendOptions::ARCMTMigrateReportOut
◆ ASTDumpAll
unsigned clang::FrontendOptions::ASTDumpAll
◆ ASTDumpDecls
unsigned clang::FrontendOptions::ASTDumpDecls
◆ ASTDumpDeclTypes
unsigned clang::FrontendOptions::ASTDumpDeclTypes
◆ ASTDumpFilter
std::string clang::FrontendOptions::ASTDumpFilter
◆ ASTDumpFormat
◆ ASTDumpLookups
unsigned clang::FrontendOptions::ASTDumpLookups
◆ ASTMergeFiles
std::vectorstd::string clang::FrontendOptions::ASTMergeFiles
◆ AuxTargetCPU
std::optionalstd::string clang::FrontendOptions::AuxTargetCPU
◆ AuxTargetFeatures
std::optional<std::vectorstd::string > clang::FrontendOptions::AuxTargetFeatures
◆ AuxTriple
std::string clang::FrontendOptions::AuxTriple
◆ BuildingImplicitModule
unsigned clang::FrontendOptions::BuildingImplicitModule
◆ BuildingImplicitModuleUsesLock
unsigned clang::FrontendOptions::BuildingImplicitModuleUsesLock
◆ CodeCompleteOpts
◆ CodeCompletionAt
◆ DashX
◆ DisableFree
unsigned clang::FrontendOptions::DisableFree
◆ EmitExtensionSymbolGraphs
unsigned clang::FrontendOptions::EmitExtensionSymbolGraphs
◆ EmitPrettySymbolGraphs
unsigned clang::FrontendOptions::EmitPrettySymbolGraphs
◆ EmitSymbolGraph
unsigned clang::FrontendOptions::EmitSymbolGraph
◆ EmitSymbolGraphSymbolLabelsForTesting
unsigned clang::FrontendOptions::EmitSymbolGraphSymbolLabelsForTesting
◆ ExtractAPIIgnoresFileList
std::vectorstd::string clang::FrontendOptions::ExtractAPIIgnoresFileList
◆ FixAndRecompile
unsigned clang::FrontendOptions::FixAndRecompile
◆ FixItSuffix
std::string clang::FrontendOptions::FixItSuffix
◆ FixOnlyWarnings
unsigned clang::FrontendOptions::FixOnlyWarnings
◆ FixToTemporaries
unsigned clang::FrontendOptions::FixToTemporaries
◆ FixWhatYouCan
unsigned clang::FrontendOptions::FixWhatYouCan
◆ GenerateGlobalModuleIndex
unsigned clang::FrontendOptions::GenerateGlobalModuleIndex
◆ GenReducedBMI
unsigned clang::FrontendOptions::GenReducedBMI
◆ IncludeTimestamps
unsigned clang::FrontendOptions::IncludeTimestamps
◆ Inputs
The input files and their types.
Definition at line 498 of file FrontendOptions.h.
Referenced by clang::tooling::dependencies::ModuleDepCollector::applyDiscoveredDependencies(), applyTransforms(), clang::FixItRecompile::BeginInvocation(), clang::PrecompiledPreamble::Build(), clang::ReplCodeCompleter::codeComplete(), clang::ExtractAPIAction::CreateASTConsumer(), clang::WrappingExtractAPIAction::CreateASTConsumer(), clang::createChainedIncludesSource(), GenerateFrontendArgs(), makeCommonInvocationForModuleBuild(), and ParseFrontendArgs().
◆ IsSystemModule
unsigned clang::FrontendOptions::IsSystemModule
◆ LLVMArgs
std::vectorstd::string clang::FrontendOptions::LLVMArgs
◆ ModuleFileExtensions
std::vector<std::shared_ptr<ModuleFileExtension> > clang::FrontendOptions::ModuleFileExtensions
◆ ModuleFiles
std::vectorstd::string clang::FrontendOptions::ModuleFiles
◆ ModuleMapFiles
std::vectorstd::string clang::FrontendOptions::ModuleMapFiles
◆ ModuleOutputPath
std::string clang::FrontendOptions::ModuleOutputPath
◆ ModulesEmbedAllFiles
unsigned clang::FrontendOptions::ModulesEmbedAllFiles
◆ ModulesEmbedFiles
std::vectorstd::string clang::FrontendOptions::ModulesEmbedFiles
◆ ModulesShareFileManager
unsigned clang::FrontendOptions::ModulesShareFileManager
◆ MTMigrateDir
std::string clang::FrontendOptions::MTMigrateDir
◆ ObjCMTAction
◆ ObjCMTAllowListPath
std::string clang::FrontendOptions::ObjCMTAllowListPath
◆ OriginalModuleMap
std::string clang::FrontendOptions::OriginalModuleMap
When the input is a module map, the original module map file from which that map was inferred, if any (for umbrella modules).
Definition at line 502 of file FrontendOptions.h.
Referenced by prepareToBuildModule().
◆ OutputFile
std::string clang::FrontendOptions::OutputFile
◆ OverrideRecordLayoutsFile
std::string clang::FrontendOptions::OverrideRecordLayoutsFile
◆ PluginArgs
std::map<std::string, std::vectorstd::string > clang::FrontendOptions::PluginArgs
◆ Plugins
std::vectorstd::string clang::FrontendOptions::Plugins
◆ PrintEnabledExtensions
unsigned clang::FrontendOptions::PrintEnabledExtensions
Print the extensions enabled for the current target.
Definition at line 311 of file FrontendOptions.h.
◆ PrintSupportedCPUs
unsigned clang::FrontendOptions::PrintSupportedCPUs
◆ PrintSupportedExtensions
unsigned clang::FrontendOptions::PrintSupportedExtensions
Print the supported extensions for the current target.
Definition at line 307 of file FrontendOptions.h.
◆ ProductName
std::string clang::FrontendOptions::ProductName
◆ ProgramAction
◆ RelocatablePCH
unsigned clang::FrontendOptions::RelocatablePCH
◆ ShowHelp
unsigned clang::FrontendOptions::ShowHelp
◆ ShowStats
unsigned clang::FrontendOptions::ShowStats
◆ ShowVersion
unsigned clang::FrontendOptions::ShowVersion
◆ SkipFunctionBodies
unsigned clang::FrontendOptions::SkipFunctionBodies
◆ StatsFile
std::string clang::FrontendOptions::StatsFile
◆ SymbolGraphOutputDir
std::string clang::FrontendOptions::SymbolGraphOutputDir
◆ TimeTraceGranularity
unsigned clang::FrontendOptions::TimeTraceGranularity
Minimum time granularity (in microseconds) traced by time profiler.
Definition at line 581 of file FrontendOptions.h.
◆ TimeTracePath
std::string clang::FrontendOptions::TimeTracePath
Path which stores the output files for -ftime-trace.
Definition at line 589 of file FrontendOptions.h.
◆ TimeTraceVerbose
unsigned clang::FrontendOptions::TimeTraceVerbose
Make time trace capture verbose event details (e.g.
source filenames). This can increase the size of the output by 2-3 times.
Definition at line 586 of file FrontendOptions.h.
◆ UseClangIRPipeline
unsigned clang::FrontendOptions::UseClangIRPipeline
◆ UseGlobalModuleIndex
unsigned clang::FrontendOptions::UseGlobalModuleIndex
◆ UseTemporary
unsigned clang::FrontendOptions::UseTemporary
Should a temporary file be used during compilation.
Definition at line 384 of file FrontendOptions.h.
The documentation for this class was generated from the following files:
- include/clang/Frontend/FrontendOptions.h
- lib/Frontend/FrontendOptions.cpp