clang: include/clang/Lex/PreprocessorOptions.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_

10#define LLVM_CLANG_LEX_PREPROCESSOROPTIONS_H_

11

16#include "llvm/ADT/StringRef.h"

17#include "llvm/ADT/StringSet.h"

18#include

19#include

20#include

21#include

22#include

23#include

24#include

25#include

26

27namespace llvm {

28

29class MemoryBuffer;

30

31}

32

34

35

38

39

41

42

45

46

47

49

51

52

53 PCH = 0x1,

54

55

57

58

60

62};

63

64

65

67public:

68 std::vector<std::pair<std::string, bool>> Macros;

71

72

74

75

76

78

79

81

82

83

85

86

87

89

90

91

92

93

95

96

97

98

99

100

102

103

105

106

108

109

110

113

114

116

117

118

120

121

123

124

125

127

128

129

130

131

132

134

135

136

137

138

139

140

142

143

144

145

147

148

149

150

151

152

154

155

157

158

159

161

162

163

164

165

166 std::vector<std::pair<std::string, std::string>> RemappedFiles;

167

168

169

170

172

173

175

176

177

178

179

180

181

183

184

186

187

188

189

191

192

193

194

195

196

197

198

199

200

201 std::function<std::optional<ArrayRef<dependency_directives_scan::Directive>>(

204

205

207

208

210

211

213

214public:

216

218 Macros.emplace_back(std::string(Name), false);

219 }

221 Macros.emplace_back(std::string(Name), true);

222 }

223

225 RemappedFiles.emplace_back(std::string(From), std::string(To));

226 }

227

230 }

231

235 }

236

237

238

251 }

252};

253

254}

255

256#endif

Provides LLVM's BitmaskEnum facility to enumeration types declared in namespace clang.

@ LLVM_MARK_AS_BITMASK_ENUM

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.