clang API Documentation
FrontendOptions - Options for controlling the behavior of the frontend. More...
#include <FrontendOptions.h>

Public Types | |
| enum | { ARCMT_None, ARCMT_Check, ARCMT_Modify, ARCMT_Migrate } |
| enum | { ObjCMT_None = 0, ObjCMT_Literals = 0x1, ObjCMT_Subscripting = 0x2 } |
Public Member Functions | |
| FrontendOptions () | |
Static Public Member Functions | |
| static InputKind | getInputKindForExtension (StringRef Extension) |
Public Attributes | |
| unsigned | DisableFree: 1 |
| Disable memory freeing on exit. | |
| unsigned | RelocatablePCH: 1 |
| unsigned | ShowHelp: 1 |
| Show the -help text. | |
| unsigned | ShowMacrosInCodeCompletion: 1 |
| unsigned | ShowCodePatternsInCodeCompletion: 1 |
| unsigned | ShowGlobalSymbolsInCodeCompletion: 1 |
| unsigned | ShowStats: 1 |
| unsigned | ShowTimers: 1 |
| unsigned | ShowVersion: 1 |
| Show the -version text. | |
| unsigned | FixWhatYouCan: 1 |
| 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 |
| unsigned | SkipFunctionBodies: 1 |
| enum clang::FrontendOptions:: { ... } | ARCMTAction |
| unsigned | ObjCMTAction |
| std::string | MTMigrateDir |
| std::string | ARCMTMigrateReportOut |
| std::vector< FrontendInputFile > | Inputs |
| The input files and their types. | |
| std::string | OutputFile |
| The output file, if any. | |
| std::string | FixItSuffix |
| If given, the new suffix for fix-it rewritten files. | |
| ParsedSourceLocation | CodeCompletionAt |
| If given, enable code completion at the provided location. | |
| frontend::ActionKind | ProgramAction |
| The frontend action to perform. | |
| std::string | ActionName |
| The name of the action to run when using a plugin action. | |
| std::vector< std::string > | PluginArgs |
| Args to pass to the plugin. | |
| std::vector< std::string > | AddPluginActions |
| The list of plugin actions to run in addition to the normal action. | |
| std::vector< std::vector < std::string > > | AddPluginArgs |
| Args to pass to the additional plugins. | |
| std::vector< std::string > | Plugins |
| The list of plugins to load. | |
| 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). | |
FrontendOptions - Options for controlling the behavior of the frontend.
Definition at line 89 of file FrontendOptions.h.
| anonymous enum |
Definition at line 119 of file FrontendOptions.h.
| anonymous enum |
| ObjCMT_None | |
| ObjCMT_Literals |
Enable migration to modern ObjC literals. |
| ObjCMT_Subscripting |
Enable migration to modern ObjC subscripting. |
Definition at line 126 of file FrontendOptions.h.
| clang::FrontendOptions::FrontendOptions | ( | ) | [inline] |
Definition at line 180 of file FrontendOptions.h.
References ActionName, ARCMT_None, ARCMTAction, ARCMTMigrateEmitARCErrors, DisableFree, ObjCMT_None, ObjCMTAction, clang::frontend::ParseSyntaxOnly, ProgramAction, RelocatablePCH, ShowCodePatternsInCodeCompletion, ShowGlobalSymbolsInCodeCompletion, ShowHelp, ShowMacrosInCodeCompletion, ShowStats, ShowTimers, ShowVersion, and SkipFunctionBodies.
| InputKind FrontendOptions::getInputKindForExtension | ( | StringRef | Extension | ) | [static] |
getInputKindForExtension - Return the appropriate input kind for a file extension. For example, "c" would return IK_C.
Definition at line 14 of file FrontendOptions.cpp.
References clang::IK_Asm, clang::IK_AST, clang::IK_C, clang::IK_CUDA, clang::IK_CXX, clang::IK_LLVM_IR, clang::IK_ObjC, clang::IK_ObjCXX, clang::IK_OpenCL, clang::IK_PreprocessedC, clang::IK_PreprocessedCXX, clang::IK_PreprocessedObjC, and clang::IK_PreprocessedObjCXX.
Referenced by FrontendOptsToArgs(), and ParseFrontendArgs().
| std::string clang::FrontendOptions::ActionName |
The name of the action to run when using a plugin action.
Definition at line 154 of file FrontendOptions.h.
Referenced by CreateFrontendBaseAction(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<std::string> clang::FrontendOptions::AddPluginActions |
The list of plugin actions to run in addition to the normal action.
Definition at line 160 of file FrontendOptions.h.
Referenced by FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<std::vector<std::string> > clang::FrontendOptions::AddPluginArgs |
Args to pass to the additional plugins.
Definition at line 163 of file FrontendOptions.h.
Referenced by FrontendOptsToArgs(), and ParseFrontendArgs().
| enum { ... } clang::FrontendOptions::ARCMTAction |
Referenced by CreateFrontendAction(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
Definition at line 112 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::string clang::FrontendOptions::ARCMTMigrateReportOut |
Definition at line 136 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<std::string> clang::FrontendOptions::ASTMergeFiles |
The list of AST files to merge.
Definition at line 169 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
If given, enable code completion at the provided location.
Definition at line 148 of file FrontendOptions.h.
Referenced by clang::ASTUnit::CodeComplete(), clang::CompilerInstance::createCodeCompletionConsumer(), clang::ASTFrontendAction::ExecuteAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::DisableFree |
Disable memory freeing on exit.
Definition at line 91 of file FrontendOptions.h.
Referenced by compileModule(), clang::FrontendAction::EndSourceFile(), clang::ExecuteCompilerInvocation(), FrontendOptions(), FrontendOptsToArgs(), clang::ASTUnit::LoadFromCompilerInvocationAction(), and ParseFrontendArgs().
Apply fixes and recompile.
Definition at line 110 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::string clang::FrontendOptions::FixItSuffix |
If given, the new suffix for fix-it rewritten files.
Definition at line 145 of file FrontendOptions.h.
Referenced by clang::FixItAction::BeginSourceFileAction(), and ParseFrontendArgs().
Apply fixes only for warnings.
Definition at line 109 of file FrontendOptions.h.
Referenced by clang::FixItRecompile::BeginInvocation(), FrontendOptsToArgs(), and ParseFrontendArgs().
Apply fixes to temporary files.
Definition at line 111 of file FrontendOptions.h.
Referenced by clang::FixItRecompile::BeginInvocation(), FrontendOptsToArgs(), and ParseFrontendArgs().
Apply fixes even if there are unfixable errors.
Definition at line 107 of file FrontendOptions.h.
Referenced by clang::FixItRecompile::BeginInvocation(), clang::FixItAction::BeginSourceFileAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<FrontendInputFile> clang::FrontendOptions::Inputs |
The input files and their types.
Definition at line 139 of file FrontendOptions.h.
Referenced by applyTransforms(), clang::FixItRecompile::BeginInvocation(), compileModule(), clang::ChainedIncludesSource::create(), FrontendOptsToArgs(), clang::ASTUnit::getMainFileName(), and ParseFrontendArgs().
| std::vector<std::string> clang::FrontendOptions::LLVMArgs |
A list of arguments to forward to LLVM's option processing; this should only be used for debugging and experimental features.
Definition at line 173 of file FrontendOptions.h.
Referenced by clang::ExecuteCompilerInvocation(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::string clang::FrontendOptions::MTMigrateDir |
Definition at line 135 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::ObjCMTAction |
Definition at line 133 of file FrontendOptions.h.
Referenced by CreateFrontendAction(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::string clang::FrontendOptions::OutputFile |
The output file, if any.
Definition at line 142 of file FrontendOptions.h.
Referenced by compileModule(), clang::GeneratePCHAction::ComputeASTConsumerArguments(), clang::GenerateModuleAction::ComputeASTConsumerArguments(), clang::ento::AnalysisAction::CreateASTConsumer(), clang::arcmt::MigrateSourceAction::CreateASTConsumer(), clang::ASTDumpXMLAction::CreateASTConsumer(), clang::GeneratePTHAction::ExecuteAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
File name of the file that will provide record layouts (in the format produced by -fdump-record-layouts).
Definition at line 177 of file FrontendOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<std::string> clang::FrontendOptions::PluginArgs |
Args to pass to the plugin.
Definition at line 157 of file FrontendOptions.h.
Referenced by CreateFrontendBaseAction(), FrontendOptsToArgs(), and ParseFrontendArgs().
| std::vector<std::string> clang::FrontendOptions::Plugins |
The list of plugins to load.
Definition at line 166 of file FrontendOptions.h.
Referenced by clang::ento::AnalysisAction::CreateASTConsumer(), clang::ExecuteCompilerInvocation(), FrontendOptsToArgs(), and ParseFrontendArgs().
The frontend action to perform.
Definition at line 151 of file FrontendOptions.h.
Referenced by clang::CompilerInvocation::CreateFromArgs(), CreateFrontendBaseAction(), FrontendOptions(), FrontendOptsToArgs(), InitializePredefinedMacros(), and ParseFrontendArgs().
When generating PCH files, instruct the AST writer to create relocatable PCH files.
Definition at line 92 of file FrontendOptions.h.
Referenced by clang::GeneratePCHAction::ComputeASTConsumerArguments(), clang::GeneratePCHAction::CreateASTConsumer(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
Show code patterns in code completion results.
Definition at line 98 of file FrontendOptions.h.
Referenced by clang::ASTUnit::CodeComplete(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
Show top-level decls in code completion results.
Definition at line 100 of file FrontendOptions.h.
Referenced by clang::ASTUnit::CodeComplete(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::ShowHelp |
Show the -help text.
Definition at line 95 of file FrontendOptions.h.
Referenced by clang::ExecuteCompilerInvocation(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
Show macros in code completion results.
Definition at line 96 of file FrontendOptions.h.
Referenced by clang::ASTUnit::CodeComplete(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::ShowStats |
Show frontend performance metrics and statistics.
Definition at line 102 of file FrontendOptions.h.
Referenced by clang::FrontendAction::EndSourceFile(), clang::CompilerInstance::ExecuteAction(), clang::ASTFrontendAction::ExecuteAction(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::ShowTimers |
Show timers for individual actions.
Definition at line 104 of file FrontendOptions.h.
Referenced by clang::CodeGenAction::CreateASTConsumer(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
| unsigned clang::FrontendOptions::ShowVersion |
Show the -version text.
Definition at line 106 of file FrontendOptions.h.
Referenced by clang::ExecuteCompilerInvocation(), FrontendOptions(), FrontendOptsToArgs(), and ParseFrontendArgs().
Emit ARC errors even if the migrator can fix them Skip over function bodies to speed up parsing in cases you do not need them (e.g. with code completion).
Definition at line 114 of file FrontendOptions.h.
Referenced by clang::ASTFrontendAction::ExecuteAction(), FrontendOptions(), and clang::CompilerInstance::setCodeCompletionConsumer().