9#ifndef LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_
10#define LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_
16#include "llvm/ADT/StringRef.h"
17#include "llvm/ADT/StringSet.h"
61 LLVM_MARK_AS_BITMASK_ENUM(
Module)
68 std::vector<std::pair<std::string,
bool>>
Macros;
201 std::function<std::optional<ArrayRef<dependency_directives_scan::Directive>>(
218 Macros.emplace_back(std::string(Name),
false);
221 Macros.emplace_back(std::string(Name),
true);
225 RemappedFiles.emplace_back(std::string(From), std::string(To));
Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.
This is the interface for scanning header and source files to get the minimum necessary preprocessor ...
Defines interfaces for clang::FileEntry and clang::FileEntryRef.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
A reference to a FileEntry that includes the name of the file as it was accessed by the FileManager's...
Describes a module or submodule.
PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...
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...
bool PCHWithHdrStopCreate
When true, we are creating a PCH or creating the PCH object while expecting a #pragma hdrstop to sepa...
bool DisablePragmaDebugCrash
Prevents intended crashes when using #pragma clang __debug. For testing.
std::vector< std::string > MacroIncludes
std::vector< std::string > Includes
std::pair< unsigned, bool > PrecompiledPreambleBytes
If non-zero, the implicit PCH include is actually a precompiled preamble that covers this number of b...
bool WriteCommentListToPCH
Whether to write comment locations into the PCH when building it.
bool RemappedFilesKeepOriginalName
True if the SourceManager should report the original file name for contents of files that were remapp...
bool LexEditorPlaceholders
When enabled, the preprocessor will construct editor placeholder tokens.
void resetNonModularOptions()
Reset any options that are not considered when building a module.
bool RetainRemappedFileBuffers
Whether the compiler instance should retain (i.e., not free) the buffers associated with remapped fil...
ObjCXXARCStandardLibraryKind ObjCXXARCStandardLibrary
The Objective-C++ ARC standard library that we should support, by providing appropriate definitions t...
bool ModulesCheckRelocated
Perform extra checks when loading PCM files for mutable file systems.
void addMacroUndef(StringRef Name)
std::string PCHThroughHeader
If non-empty, the filename used in an #include directive in the primary source file (or command-line ...
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::vector< std::string > EmbedEntries
User specified embed entries.
bool SingleFileParseMode
When enabled, preprocessor is in a mode for parsing a single file only.
void addMacroDef(StringRef Name)
bool DefineTargetOSMacros
Indicates whether to predefine target OS macros.
bool DetailedRecord
Whether we should maintain a detailed record of all macro definitions and expansions.
void addRemappedFile(StringRef From, llvm::MemoryBuffer *To)
std::vector< std::string > ChainedIncludes
Headers that will be converted to chained PCHs in memory.
bool RetainExcludedConditionalBlocks
When enabled, excluded conditional blocks retain in the main file.
void clearRemappedFiles()
bool PCHWithHdrStop
When true, we are creating or using a PCH where a #pragma hdrstop is expected to indicate the beginni...
std::string ImplicitPCHInclude
The implicit PCH included at the start of the translation unit, or empty.
DisableValidationForModuleKind DisablePCHOrModuleValidation
Whether to disable most of the normal validation performed on precompiled headers and module files.
bool AllowPCHWithDifferentModulesCachePath
When true, a PCH with modules cache path different to the current compilation will not be rejected.
bool DumpDeserializedPCHDecls
Dump declarations that are deserialized from PCH, for testing.
std::optional< uint64_t > SourceDateEpoch
If set, the UNIX timestamp specified by SOURCE_DATE_EPOCH.
bool UsePredefines
Initialize the preprocessor with the compiler and target specific predefines.
void addRemappedFile(StringRef From, StringRef To)
bool SetUpStaticAnalyzer
Set up preprocessor for RunAnalysis action.
std::vector< std::pair< std::string, bool > > Macros
std::function< std::optional< ArrayRef< dependency_directives_scan::Directive > >(FileEntryRef)> DependencyDirectivesForFile
Function for getting the dependency preprocessor directives of a file.
bool GeneratePreamble
True indicates that a preamble is being generated.
bool AllowPCHWithCompilerErrors
When true, a PCH with compiler errors will not be rejected.
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...
The JSON file list parser is used to communicate input to InstallAPI.
ObjCXXARCStandardLibraryKind
Enumerate the kinds of standard library that.
@ ARCXX_libstdcxx
libstdc++
DisableValidationForModuleKind
Whether to disable the normal validation performed on precompiled headers and module files when they ...
@ None
Perform validation, don't disable it.
@ PCH
Disable validation for a precompiled header and the modules it depends on.
@ None
The alignment was not explicit in code.
Diagnostic wrappers for TextAPI types for error reporting.