9 #ifndef LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 10 #define LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_ 13 #include "llvm/ADT/StringRef.h" 14 #include "llvm/ADT/StringSet.h" 44 std::vector<std::pair<std::string,
bool>>
Macros;
50 bool UsePredefines =
true;
54 bool DetailedRecord =
false;
58 bool PCHWithHdrStop =
false;
64 bool PCHWithHdrStopCreate =
false;
81 bool DisablePCHValidation =
false;
84 bool AllowPCHWithCompilerErrors =
false;
87 bool DumpDeserializedPCHDecls =
false;
105 bool GeneratePreamble =
false;
110 bool WriteCommentListToPCH =
true;
117 bool SingleFileParseMode =
false;
120 bool LexEditorPlaceholders =
true;
124 bool RemappedFilesKeepOriginalName =
true;
143 bool RetainRemappedFileBuffers =
false;
152 llvm::StringSet<> Failed;
156 return Failed.count(module) > 0;
160 Failed.insert(module);
175 void addMacroDef(StringRef Name) { Macros.emplace_back(Name,
false); }
179 RemappedFiles.emplace_back(From, To);
183 RemappedFileBuffers.emplace_back(From, To);
187 RemappedFiles.clear();
188 RemappedFileBuffers.clear();
195 MacroIncludes.clear();
196 ChainedIncludes.clear();
197 DumpDeserializedPCHDecls =
false;
198 ImplicitPCHInclude.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.
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)
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.