clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
clang::FrontendOptions Class Reference

FrontendOptions - Options for controlling the behavior of the frontend. More...

#include <FrontendOptions.h>

Collaboration diagram for clang::FrontendOptions:
Collaboration graph
[legend]

List of all members.

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
}

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 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
unsigned UseGlobalModuleIndex: 1
unsigned GenerateGlobalModuleIndex: 1
unsigned ASTDumpDecls: 1
unsigned ASTDumpLookups: 1
CodeCompleteOptions CodeCompleteOpts
enum clang::FrontendOptions:: { ... }  ARCMTAction
unsigned ObjCMTAction
std::string ObjCMTWhiteListPath
std::string MTMigrateDir
std::string ARCMTMigrateReportOut
std::vector< FrontendInputFileInputs
 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.
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
 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 > ModuleFiles
 The list of additional prebuilt module files to load before processing the input.
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).

Detailed Description

FrontendOptions - Options for controlling the behavior of the frontend.

Definition at line 118 of file FrontendOptions.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ARCMT_None 
ARCMT_Check 
ARCMT_Modify 
ARCMT_Migrate 

Definition at line 152 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 159 of file FrontendOptions.h.


Constructor & Destructor Documentation

Definition at line 252 of file FrontendOptions.h.


Member Function Documentation

InputKind FrontendOptions::getInputKindForExtension ( StringRef  Extension) [static]

getInputKindForExtension - Return the appropriate input kind for a file extension. For example, "c" would return IK_C.

Returns:
The input kind for the extension, or IK_None if the extension is not recognized.

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 ParseFrontendArgs().


Member Data Documentation

The name of the action to run when using a plugin action.

Definition at line 222 of file FrontendOptions.h.

Referenced by CreateFrontendBaseAction(), 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 228 of file FrontendOptions.h.

Referenced by ParseFrontendArgs().

std::vector<std::vector<std::string> > clang::FrontendOptions::AddPluginArgs

Args to pass to the additional plugins.

Definition at line 231 of file FrontendOptions.h.

Referenced by ParseFrontendArgs().

Definition at line 135 of file FrontendOptions.h.

Referenced by CreateFrontendAction(), and ParseFrontendArgs().

Definition at line 201 of file FrontendOptions.h.

Referenced by CreateFrontendAction(), and ParseFrontendArgs().

Whether we include declaration dumps in AST dumps.

Definition at line 145 of file FrontendOptions.h.

Referenced by clang::ASTDumpAction::CreateASTConsumer(), and ParseFrontendArgs().

If given, filter dumped AST Decl nodes by this substring.

Definition at line 213 of file FrontendOptions.h.

Referenced by clang::ASTPrintAction::CreateASTConsumer(), clang::ASTDumpAction::CreateASTConsumer(), and ParseFrontendArgs().

Whether we include lookup table dumps in AST dumps.

Definition at line 147 of file FrontendOptions.h.

Referenced by clang::ASTDumpAction::CreateASTConsumer(), and ParseFrontendArgs().

std::vector<std::string> clang::FrontendOptions::ASTMergeFiles

The list of AST files to merge.

Definition at line 241 of file FrontendOptions.h.

Referenced by CreateFrontendAction(), and ParseFrontendArgs().

Definition at line 150 of file FrontendOptions.h.

Referenced by clang::ASTUnit::CodeComplete(), and ParseFrontendArgs().

If given, enable code completion at the provided location.

Definition at line 216 of file FrontendOptions.h.

Referenced by clang::ASTUnit::CodeComplete(), clang::CompilerInstance::createCodeCompletionConsumer(), clang::ASTFrontendAction::ExecuteAction(), and ParseFrontendArgs().

Apply fixes and recompile.

Definition at line 133 of file FrontendOptions.h.

Referenced by CreateFrontendAction(), and ParseFrontendArgs().

If given, the new suffix for fix-it rewritten files.

Definition at line 210 of file FrontendOptions.h.

Referenced by clang::FixItAction::BeginSourceFileAction(), and ParseFrontendArgs().

Apply fixes only for warnings.

Definition at line 132 of file FrontendOptions.h.

Referenced by clang::FixItRecompile::BeginInvocation(), and ParseFrontendArgs().

Apply fixes to temporary files.

Definition at line 134 of file FrontendOptions.h.

Referenced by clang::FixItRecompile::BeginInvocation(), and ParseFrontendArgs().

Apply fixes even if there are unfixable errors.

Definition at line 130 of file FrontendOptions.h.

Referenced by clang::FixItRecompile::BeginInvocation(), clang::FixItAction::BeginSourceFileAction(), and ParseFrontendArgs().

Whether we can generate the global module index if needed.

Definition at line 143 of file FrontendOptions.h.

Referenced by compileModuleImpl(), ParseFrontendArgs(), and clang::CompilerInstance::shouldBuildGlobalModuleIndex().

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 245 of file FrontendOptions.h.

Referenced by clang::ExecuteCompilerInvocation(), and ParseFrontendArgs().

std::vector<std::string> clang::FrontendOptions::ModuleFiles

The list of additional prebuilt module files to load before processing the input.

Definition at line 238 of file FrontendOptions.h.

Referenced by clang::FrontendAction::BeginSourceFile(), and ParseFrontendArgs().

Definition at line 200 of file FrontendOptions.h.

Referenced by CreateFrontendAction(), and ParseFrontendArgs().

File name of the file that will provide record layouts (in the format produced by -fdump-record-layouts).

Definition at line 249 of file FrontendOptions.h.

Referenced by clang::FrontendAction::BeginSourceFile(), and ParseFrontendArgs().

std::vector<std::string> clang::FrontendOptions::PluginArgs

Args to pass to the plugin.

Definition at line 225 of file FrontendOptions.h.

Referenced by CreateFrontendBaseAction(), and ParseFrontendArgs().

std::vector<std::string> clang::FrontendOptions::Plugins

The list of plugins to load.

Definition at line 234 of file FrontendOptions.h.

Referenced by clang::ento::CreateAnalysisConsumer(), clang::ExecuteCompilerInvocation(), and ParseFrontendArgs().

When generating PCH files, instruct the AST writer to create relocatable PCH files.

Definition at line 121 of file FrontendOptions.h.

Referenced by clang::GeneratePCHAction::ComputeASTConsumerArguments(), clang::GeneratePCHAction::CreateASTConsumer(), and ParseFrontendArgs().

Show the -help text.

Definition at line 124 of file FrontendOptions.h.

Referenced by clang::ExecuteCompilerInvocation(), and ParseFrontendArgs().

Show frontend performance metrics and statistics.

Definition at line 125 of file FrontendOptions.h.

Referenced by clang::FrontendAction::EndSourceFile(), clang::CompilerInstance::ExecuteAction(), clang::ASTFrontendAction::ExecuteAction(), and ParseFrontendArgs().

Show timers for individual actions.

Definition at line 127 of file FrontendOptions.h.

Referenced by clang::CodeGenAction::CreateASTConsumer(), and ParseFrontendArgs().

Show the -version text.

Definition at line 129 of file FrontendOptions.h.

Referenced by clang::ExecuteCompilerInvocation(), 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 137 of file FrontendOptions.h.

Referenced by clang::ASTFrontendAction::ExecuteAction().

Whether we can use the global module index if available.

Definition at line 141 of file FrontendOptions.h.

Referenced by clang::CompilerInstance::createModuleManager(), and ParseFrontendArgs().


The documentation for this class was generated from the following files: