9 #ifndef LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 10 #define LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 14 #include "llvm/ADT/StringRef.h" 15 #include "llvm/ADT/StringSet.h" 47 std::vector<std::pair<std::string,
bool>>
Macros;
53 bool UsePredefines =
true;
57 bool DetailedRecord =
false;
61 bool PCHWithHdrStop =
false;
67 bool PCHWithHdrStopCreate =
false;
84 bool DisablePCHValidation =
false;
87 bool AllowPCHWithCompilerErrors =
false;
90 bool DumpDeserializedPCHDecls =
false;
108 bool GeneratePreamble =
false;
113 bool WriteCommentListToPCH =
true;
120 bool SingleFileParseMode =
false;
123 bool LexEditorPlaceholders =
true;
127 bool RemappedFilesKeepOriginalName =
true;
146 bool RetainRemappedFileBuffers =
false;
149 bool RetainExcludedConditionalBlocks =
false;
158 llvm::StringSet<> Failed;
162 return Failed.count(module) > 0;
166 Failed.insert(module);
187 *ExcludedConditionalDirectiveSkipMappings =
nullptr;
190 bool SetUpStaticAnalyzer =
false;
193 bool DisablePragmaDebugCrash =
false;
198 void addMacroDef(StringRef Name) { Macros.emplace_back(Name,
false); }
202 RemappedFiles.emplace_back(From, To);
206 RemappedFileBuffers.emplace_back(From, To);
210 RemappedFiles.clear();
211 RemappedFileBuffers.clear();
218 MacroIncludes.clear();
219 ChainedIncludes.clear();
220 DumpDeserializedPCHDecls =
false;
221 ImplicitPCHInclude.clear();
222 SingleFileParseMode =
false;
223 LexEditorPlaceholders =
true;
224 RetainRemappedFileBuffers =
true;
225 PrecompiledPreambleBytes.first = 0;
226 PrecompiledPreambleBytes.second =
false;
227 RetainExcludedConditionalBlocks =
false;
233 #endif // LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ std::vector< std::pair< std::string, bool > > Macros
void addMacroUndef(StringRef Name)
ObjCXXARCStandardLibraryKind
Enumerate the kinds of standard library that.
Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be placed into a PointerUnion...
std::vector< std::string > Includes
PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...
std::shared_ptr< FailedModulesSet > FailedModules
The set of modules that failed to build.
void addRemappedFile(StringRef From, StringRef To)
void addRemappedFile(StringRef From, llvm::MemoryBuffer *To)
void addFailed(StringRef module)
std::map< std::string, std::string, std::greater< std::string > > MacroPrefixMap
A prefix map for FILE and BASE_FILE.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
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...
std::vector< std::string > ChainedIncludes
Headers that will be converted to chained PCHs in memory.
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...
std::string ImplicitPCHInclude
The implicit PCH included at the start of the translation unit, or empty.
void resetNonModularOptions()
Reset any options that are not considered when building a module.
std::string PCHThroughHeader
If non-empty, the filename used in an #include directive in the primary source file (or command-line ...
void addMacroDef(StringRef Name)
std::vector< std::string > MacroIncludes
Dataflow Directional Tag Classes.
bool hasAlreadyFailed(StringRef module)
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...
std::pair< unsigned, bool > PrecompiledPreambleBytes
If non-zero, the implicit PCH include is actually a precompiled preamble that covers this number of b...
llvm::DenseMap< const llvm::MemoryBuffer *, const PreprocessorSkippedRangeMapping * > ExcludedPreprocessorDirectiveSkipMapping
The datastructure that holds the mapping between the active memory buffers and the individual skip ma...
void clearRemappedFiles()
Records the set of modules.