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;
65 bool DisablePCHValidation =
false;
68 bool AllowPCHWithCompilerErrors =
false;
71 bool DumpDeserializedPCHDecls =
false;
89 bool GeneratePreamble =
false;
103 bool SingleFileParseMode =
false;
106 bool LexEditorPlaceholders =
true;
110 bool RemappedFilesKeepOriginalName =
true;
129 bool RetainRemappedFileBuffers =
false;
138 llvm::StringSet<> Failed;
142 return Failed.count(module) > 0;
146 Failed.insert(module);
161 void addMacroDef(StringRef Name) { Macros.emplace_back(Name,
false); }
165 RemappedFiles.emplace_back(From, To);
169 RemappedFileBuffers.emplace_back(From, To);
173 RemappedFiles.clear();
174 RemappedFileBuffers.clear();
181 MacroIncludes.clear();
182 ChainedIncludes.clear();
183 DumpDeserializedPCHDecls =
false;
184 ImplicitPCHInclude.clear();
185 ImplicitPTHInclude.clear();
187 SingleFileParseMode =
false;
188 LexEditorPlaceholders =
true;
189 RetainRemappedFileBuffers =
true;
190 PrecompiledPreambleBytes.first = 0;
191 PrecompiledPreambleBytes.second =
false;
197 #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.
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.