|
clang
5.0.0
|
PreprocessorOptions - This class is used for passing the various options used in preprocessor initialization to InitializePreprocessor(). More...
#include "clang/Lex/PreprocessorOptions.h"
Classes | |
| class | FailedModulesSet |
| Records the set of modules. More... | |
Public Member Functions | |
| PreprocessorOptions () | |
| void | addMacroDef (StringRef Name) |
| void | addMacroUndef (StringRef Name) |
| void | addRemappedFile (StringRef From, StringRef To) |
| void | addRemappedFile (StringRef From, llvm::MemoryBuffer *To) |
| void | clearRemappedFiles () |
| void | resetNonModularOptions () |
| Reset any options that are not considered when building a module. More... | |
Public Attributes | |
| std::vector< std::pair < std::string, bool > > | Macros |
| std::vector< std::string > | Includes |
| std::vector< std::string > | MacroIncludes |
| unsigned | UsePredefines: 1 |
| Initialize the preprocessor with the compiler and target specific predefines. More... | |
| unsigned | DetailedRecord: 1 |
| Whether we should maintain a detailed record of all macro definitions and expansions. More... | |
| std::string | ImplicitPCHInclude |
| The implicit PCH included at the start of the translation unit, or empty. More... | |
| std::vector< std::string > | ChainedIncludes |
| Headers that will be converted to chained PCHs in memory. More... | |
| bool | DisablePCHValidation |
| When true, disables most of the normal validation performed on precompiled headers. More... | |
| bool | AllowPCHWithCompilerErrors |
| When true, a PCH with compiler errors will not be rejected. More... | |
| bool | DumpDeserializedPCHDecls |
| Dump declarations that are deserialized from PCH, for testing. More... | |
| std::set< std::string > | DeserializedPCHDeclsToErrorOn |
| This is a set of names for decls that we do not want to be deserialized, and we emit an error if they are; for testing purposes. More... | |
| std::pair< unsigned, bool > | PrecompiledPreambleBytes |
| If non-zero, the implicit PCH include is actually a precompiled preamble that covers this number of bytes in the main source file. More... | |
| bool | GeneratePreamble |
| True indicates that a preamble is being generated. More... | |
| std::string | ImplicitPTHInclude |
| The implicit PTH input included at the start of the translation unit, or empty. More... | |
| std::string | TokenCache |
| If given, a PTH cache file to use for speeding up header parsing. More... | |
| bool | SingleFileParseMode = false |
| When enabled, preprocessor is in a mode for parsing a single file only. More... | |
| bool | LexEditorPlaceholders = true |
| When enabled, the preprocessor will construct editor placeholder tokens. More... | |
| bool | RemappedFilesKeepOriginalName |
| True if the SourceManager should report the original file name for contents of files that were remapped to other files. More... | |
| std::vector< std::pair < std::string, std::string > > | RemappedFiles |
| The set of file remappings, which take existing files on the system (the first part of each pair) and gives them the contents of other files on the system (the second part of each pair). More... | |
| std::vector< std::pair < std::string, llvm::MemoryBuffer * > > | RemappedFileBuffers |
| The set of file-to-buffer remappings, which take existing files on the system (the first part of each pair) and gives them the contents of the specified memory buffer (the second part of each pair). More... | |
| bool | RetainRemappedFileBuffers |
| Whether the compiler instance should retain (i.e., not free) the buffers associated with remapped files. More... | |
| ObjCXXARCStandardLibraryKind | ObjCXXARCStandardLibrary |
| The Objective-C++ ARC standard library that we should support, by providing appropriate definitions to retrofit the standard library with support for lifetime-qualified pointers. More... | |
| std::shared_ptr< FailedModulesSet > | FailedModules |
| The set of modules that failed to build. More... | |
PreprocessorOptions - This class is used for passing the various options used in preprocessor initialization to InitializePreprocessor().
Definition at line 43 of file PreprocessorOptions.h.
|
inline |
Definition at line 159 of file PreprocessorOptions.h.
|
inline |
Definition at line 169 of file PreprocessorOptions.h.
References Macros.
Referenced by ParsePreprocessorArgs().
|
inline |
Definition at line 170 of file PreprocessorOptions.h.
References Macros.
Referenced by ParsePreprocessorArgs().
|
inline |
Definition at line 171 of file PreprocessorOptions.h.
References RemappedFiles.
Referenced by clang::arcmt::FileRemapper::applyMappings(), clang::PrecompiledPreamble::Build(), clang::ASTUnit::CodeComplete(), ParsePreprocessorArgs(), and clang::ASTUnit::Reparse().
|
inline |
Definition at line 175 of file PreprocessorOptions.h.
References RemappedFileBuffers.
|
inline |
Definition at line 179 of file PreprocessorOptions.h.
References RemappedFileBuffers, and RemappedFiles.
Referenced by clang::ASTUnit::CodeComplete(), and clang::ASTUnit::Reparse().
|
inline |
Reset any options that are not considered when building a module.
Definition at line 186 of file PreprocessorOptions.h.
References ChainedIncludes, DumpDeserializedPCHDecls, ImplicitPCHInclude, ImplicitPTHInclude, Includes, LexEditorPlaceholders, MacroIncludes, PrecompiledPreambleBytes, RetainRemappedFileBuffers, SingleFileParseMode, and TokenCache.
| bool clang::PreprocessorOptions::AllowPCHWithCompilerErrors |
When true, a PCH with compiler errors will not be rejected.
Definition at line 68 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::GeneratePCHAction::CreateASTConsumer(), clang::ASTUnit::LoadFromCommandLine(), and ParsePreprocessorArgs().
| std::vector<std::string> clang::PreprocessorOptions::ChainedIncludes |
Headers that will be converted to chained PCHs in memory.
Definition at line 61 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::createChainedIncludesSource(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::set<std::string> clang::PreprocessorOptions::DeserializedPCHDeclsToErrorOn |
This is a set of names for decls that we do not want to be deserialized, and we emit an error if they are; for testing purposes.
Definition at line 75 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), and ParsePreprocessorArgs().
| unsigned clang::PreprocessorOptions::DetailedRecord |
Whether we should maintain a detailed record of all macro definitions and expansions.
Definition at line 55 of file PreprocessorOptions.h.
Referenced by checkPreprocessorOptions(), clang::ASTUnit::CodeComplete(), clang::CompilerInstance::createPreprocessor(), clang::CompilerInvocation::getModuleHash(), and ParsePreprocessorArgs().
| bool clang::PreprocessorOptions::DisablePCHValidation |
When true, disables most of the normal validation performed on precompiled headers.
Definition at line 65 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), clang::CompilerInstance::createModuleManager(), and ParsePreprocessorArgs().
| bool clang::PreprocessorOptions::DumpDeserializedPCHDecls |
Dump declarations that are deserialized from PCH, for testing.
Definition at line 71 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::shared_ptr<FailedModulesSet> clang::PreprocessorOptions::FailedModules |
The set of modules that failed to build.
This pointer will be shared among all of the compiler instances created to (re)build modules, so that once a module fails to build anywhere, other instances will see that the module has failed and won't try to build it again.
Definition at line 156 of file PreprocessorOptions.h.
Referenced by clang::CompilerInstance::loadModule().
| bool clang::PreprocessorOptions::GeneratePreamble |
True indicates that a preamble is being generated.
When the lexer is done, one of the things that need to be preserved is the conditional if stack, so the ASTWriter/ASTReader can save/restore it when processing the rest of the file.
Definition at line 89 of file PreprocessorOptions.h.
Referenced by clang::ASTUnit::LoadFromCommandLine().
| std::string clang::PreprocessorOptions::ImplicitPCHInclude |
The implicit PCH included at the start of the translation unit, or empty.
Definition at line 58 of file PreprocessorOptions.h.
Referenced by clang::FrontendAction::BeginSourceFile(), checkPreprocessorOptions(), collectIncludePCH(), createInvocationForMigration(), clang::InitializePreprocessor(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::string clang::PreprocessorOptions::ImplicitPTHInclude |
The implicit PTH input included at the start of the translation unit, or empty.
Definition at line 93 of file PreprocessorOptions.h.
Referenced by clang::InitializePreprocessor(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::vector<std::string> clang::PreprocessorOptions::Includes |
Definition at line 46 of file PreprocessorOptions.h.
Referenced by checkPreprocessorOptions(), createInvocationForMigration(), clang::InitializePreprocessor(), ParsePreprocessorArgs(), resetNonModularOptions(), and clang::CompilerInvocation::setLangDefaults().
When enabled, the preprocessor will construct editor placeholder tokens.
Definition at line 106 of file PreprocessorOptions.h.
Referenced by ParsePreprocessorArgs(), and resetNonModularOptions().
| std::vector<std::string> clang::PreprocessorOptions::MacroIncludes |
Definition at line 47 of file PreprocessorOptions.h.
Referenced by checkPreprocessorOptions(), clang::InitializePreprocessor(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::vector<std::pair<std::string, bool> > clang::PreprocessorOptions::Macros |
Definition at line 45 of file PreprocessorOptions.h.
Referenced by addMacroDef(), addMacroUndef(), collectMacroDefinitions(), and clang::InitializePreprocessor().
| ObjCXXARCStandardLibraryKind clang::PreprocessorOptions::ObjCXXARCStandardLibrary |
The Objective-C++ ARC standard library that we should support, by providing appropriate definitions to retrofit the standard library with support for lifetime-qualified pointers.
Definition at line 134 of file PreprocessorOptions.h.
Referenced by clang::InitializePreprocessor(), and ParsePreprocessorArgs().
If non-zero, the implicit PCH include is actually a precompiled preamble that covers this number of bytes in the main source file.
The boolean indicates whether the preamble ends at the start of a new line.
Definition at line 82 of file PreprocessorOptions.h.
Referenced by clang::PrecompiledPreamble::AddImplicitPreamble(), clang::PrecompiledPreamble::Build(), clang::ASTUnit::CodeComplete(), clang::CompilerInstance::createPCHExternalASTSource(), clang::VerifyPCHAction::ExecuteAction(), clang::InitializePreprocessor(), ParsePreprocessorArgs(), and resetNonModularOptions().
| std::vector<std::pair<std::string, llvm::MemoryBuffer *> > clang::PreprocessorOptions::RemappedFileBuffers |
The set of file-to-buffer remappings, which take existing files on the system (the first part of each pair) and gives them the contents of the specified memory buffer (the second part of each pair).
Definition at line 121 of file PreprocessorOptions.h.
Referenced by addRemappedFile(), clearRemappedFiles(), InitializeFileRemapping(), clang::ASTUnit::Reparse(), and clang::ASTUnit::~ASTUnit().
| std::vector<std::pair<std::string, std::string> > clang::PreprocessorOptions::RemappedFiles |
The set of file remappings, which take existing files on the system (the first part of each pair) and gives them the contents of other files on the system (the second part of each pair).
Definition at line 116 of file PreprocessorOptions.h.
Referenced by addRemappedFile(), clang::FixItRecompile::BeginInvocation(), clearRemappedFiles(), clang::arcmt::getFileRemappings(), and InitializeFileRemapping().
| bool clang::PreprocessorOptions::RemappedFilesKeepOriginalName |
True if the SourceManager should report the original file name for contents of files that were remapped to other files.
Defaults to true.
Definition at line 110 of file PreprocessorOptions.h.
Referenced by clang::FixItRecompile::BeginInvocation(), InitializeFileRemapping(), and clang::ASTUnit::LoadFromCommandLine().
| bool clang::PreprocessorOptions::RetainRemappedFileBuffers |
Whether the compiler instance should retain (i.e., not free) the buffers associated with remapped files.
This flag defaults to false; it can be set true only through direct manipulation of the compiler invocation object, in cases where the compiler invocation and its buffers will be reused.
Definition at line 129 of file PreprocessorOptions.h.
Referenced by clang::arcmt::FileRemapper::applyMappings(), clang::PrecompiledPreamble::Build(), clang::ASTUnit::CodeComplete(), InitializeFileRemapping(), and resetNonModularOptions().
When enabled, preprocessor is in a mode for parsing a single file only.
Disables #includes of other files and if there are unresolved identifiers in preprocessor directive conditions it causes all blocks to be parsed so that the client can get the maximum amount of information from the parser.
Definition at line 103 of file PreprocessorOptions.h.
Referenced by clang::ASTUnit::LoadFromCommandLine(), and resetNonModularOptions().
| std::string clang::PreprocessorOptions::TokenCache |
If given, a PTH cache file to use for speeding up header parsing.
Definition at line 96 of file PreprocessorOptions.h.
Referenced by clang::CompilerInstance::createPreprocessor(), ParsePreprocessorArgs(), and resetNonModularOptions().
| unsigned clang::PreprocessorOptions::UsePredefines |
Initialize the preprocessor with the compiler and target specific predefines.
Definition at line 51 of file PreprocessorOptions.h.
Referenced by checkPreprocessorOptions(), clang::CompilerInvocation::getModuleHash(), clang::InitializePreprocessor(), and ParsePreprocessorArgs().
1.8.6