10 #ifndef LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 11 #define LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 14 #include "llvm/ADT/StringRef.h" 15 #include "llvm/ADT/StringSet.h" 45 std::vector<std::pair<std::string,
bool>>
Macros;
51 bool UsePredefines =
true;
55 bool DetailedRecord =
false;
72 bool DisablePCHValidation =
false;
75 bool AllowPCHWithCompilerErrors =
false;
78 bool DumpDeserializedPCHDecls =
false;
96 bool GeneratePreamble =
false;
101 bool WriteCommentListToPCH =
true;
115 bool SingleFileParseMode =
false;
118 bool LexEditorPlaceholders =
true;
122 bool RemappedFilesKeepOriginalName =
true;
141 bool RetainRemappedFileBuffers =
false;
150 llvm::StringSet<> Failed;
154 return Failed.count(module) > 0;
158 Failed.insert(module);
173 void addMacroDef(StringRef Name) { Macros.emplace_back(Name,
false); }
177 RemappedFiles.emplace_back(From, To);
181 RemappedFileBuffers.emplace_back(From, To);
185 RemappedFiles.clear();
186 RemappedFileBuffers.clear();
193 MacroIncludes.clear();
194 ChainedIncludes.clear();
195 DumpDeserializedPCHDecls =
false;
196 ImplicitPCHInclude.clear();
197 ImplicitPTHInclude.clear();
199 SingleFileParseMode =
false;
200 LexEditorPlaceholders =
true;
201 RetainRemappedFileBuffers =
true;
202 PrecompiledPreambleBytes.first = 0;
203 PrecompiledPreambleBytes.second =
false;
209 #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.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
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.
std::string ImplicitPTHInclude
The implicit PTH input included at the start of the translation unit, or empty.
void addRemappedFile(StringRef From, StringRef To)
void addRemappedFile(StringRef From, llvm::MemoryBuffer *To)
void addFailed(StringRef module)
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...
void clearRemappedFiles()
Records the set of modules.
std::string TokenCache
If given, a PTH cache file to use for speeding up header parsing.