clang  16.0.0git
FrontendOptions.h
Go to the documentation of this file.
1 //===- FrontendOptions.h ----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
10 #define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
11 
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/Support/MemoryBuffer.h"
19 #include <cassert>
20 #include <map>
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 namespace llvm {
26 
27 class MemoryBuffer;
28 
29 } // namespace llvm
30 
31 namespace clang {
32 
33 namespace frontend {
34 
35 enum ActionKind {
36  /// Parse ASTs and list Decl nodes.
38 
39  /// Parse ASTs and dump them.
41 
42  /// Parse ASTs and print them.
44 
45  /// Parse ASTs and view them in Graphviz.
47 
48  /// Dump the compiler configuration.
50 
51  /// Dump out raw tokens.
53 
54  /// Dump out preprocessed tokens.
56 
57  /// Emit a .s file.
59 
60  /// Emit a .bc file.
62 
63  /// Translate input source into HTML.
65 
66  /// Emit a .ll file.
68 
69  /// Generate LLVM IR, but do not emit anything.
71 
72  /// Generate machine code, but don't emit anything.
74 
75  /// Emit a .o file.
77 
78  // Extract API information
80 
81  /// Parse and apply any fixits to the source.
83 
84  /// Generate pre-compiled module from a module map.
86 
87  /// Generate pre-compiled module from a C++ module interface file.
89 
90  /// Generate a C++20 header unit module from a header file.
92 
93  /// Generate pre-compiled header.
95 
96  /// Generate Interface Stub Files.
98 
99  /// Only execute frontend initialization.
101 
102  /// Dump information about a module file.
104 
105  /// Load and verify that a PCH file is usable.
107 
108  /// Parse and perform semantic analysis.
110 
111  /// Run a plugin action, \see ActionName.
113 
114  /// Print the "preamble" of the input file
116 
117  /// -E mode.
119 
120  /// Expand macros but not \#includes.
122 
123  /// ObjC->C Rewriter.
125 
126  /// Rewriter playground
128 
129  /// Run one or more source code analyses.
131 
132  /// Dump template instantiations
134 
135  /// Run migrator.
137 
138  /// Just lex, no output.
140 
141  /// Print the output of the dependency directives source minimizer.
143 };
144 
145 } // namespace frontend
146 
147 /// The kind of a file that we've been handed as an input.
148 class InputKind {
149 private:
150  Language Lang;
151  unsigned Fmt : 3;
152  unsigned Preprocessed : 1;
153  unsigned HeaderUnit : 3;
154  unsigned IsHeader : 1;
155 
156 public:
157  /// The input file format.
158  enum Format {
162  };
163 
164  // If we are building a header unit, what kind it is; this affects whether
165  // we look for the file in the user or system include search paths before
166  // flagging a missing input.
172  };
173 
175  bool PP = false, HeaderUnitKind HU = HeaderUnit_None,
176  bool HD = false)
177  : Lang(L), Fmt(F), Preprocessed(PP), HeaderUnit(HU), IsHeader(HD) {}
178 
179  Language getLanguage() const { return static_cast<Language>(Lang); }
180  Format getFormat() const { return static_cast<Format>(Fmt); }
182  return static_cast<HeaderUnitKind>(HeaderUnit);
183  }
184  bool isPreprocessed() const { return Preprocessed; }
185  bool isHeader() const { return IsHeader; }
186  bool isHeaderUnit() const { return HeaderUnit != HeaderUnit_None; }
187 
188  /// Is the input kind fully-unknown?
189  bool isUnknown() const { return Lang == Language::Unknown && Fmt == Source; }
190 
191  /// Is the language of the input some dialect of Objective-C?
192  bool isObjectiveC() const {
193  return Lang == Language::ObjC || Lang == Language::ObjCXX;
194  }
195 
197  return InputKind(getLanguage(), getFormat(), true, getHeaderUnitKind(),
198  isHeader());
199  }
200 
203  getHeaderUnitKind(), true);
204  }
205 
207  return InputKind(getLanguage(), getFormat(), isPreprocessed(), HU,
208  isHeader());
209  }
210 
213  isHeader());
214  }
215 };
216 
217 /// An input file for the front end.
219  /// The file name, or "-" to read from standard input.
220  std::string File;
221 
222  /// The input, if it comes from a buffer rather than a file. This object
223  /// does not own the buffer, and the caller is responsible for ensuring
224  /// that it outlives any users.
226 
227  /// The kind of input, e.g., C source, AST file, LLVM IR.
228  InputKind Kind;
229 
230  /// Whether we're dealing with a 'system' input (vs. a 'user' input).
231  bool IsSystem = false;
232 
233 public:
234  FrontendInputFile() = default;
235  FrontendInputFile(StringRef File, InputKind Kind, bool IsSystem = false)
236  : File(File.str()), Kind(Kind), IsSystem(IsSystem) {}
237  FrontendInputFile(llvm::MemoryBufferRef Buffer, InputKind Kind,
238  bool IsSystem = false)
239  : Buffer(Buffer), Kind(Kind), IsSystem(IsSystem) {}
240 
241  InputKind getKind() const { return Kind; }
242  bool isSystem() const { return IsSystem; }
243 
244  bool isEmpty() const { return File.empty() && Buffer == std::nullopt; }
245  bool isFile() const { return !isBuffer(); }
246  bool isBuffer() const { return Buffer != std::nullopt; }
247  bool isPreprocessed() const { return Kind.isPreprocessed(); }
248  bool isHeader() const { return Kind.isHeader(); }
250  return Kind.getHeaderUnitKind();
251  }
252 
253  StringRef getFile() const {
254  assert(isFile());
255  return File;
256  }
257 
258  llvm::MemoryBufferRef getBuffer() const {
259  assert(isBuffer());
260  return *Buffer;
261  }
262 };
263 
264 /// FrontendOptions - Options for controlling the behavior of the frontend.
266 public:
267  /// Disable memory freeing on exit.
268  unsigned DisableFree : 1;
269 
270  /// When generating PCH files, instruct the AST writer to create relocatable
271  /// PCH files.
272  unsigned RelocatablePCH : 1;
273 
274  /// Show the -help text.
275  unsigned ShowHelp : 1;
276 
277  /// Show frontend performance metrics and statistics.
278  unsigned ShowStats : 1;
279 
280  /// print the supported cpus for the current target
281  unsigned PrintSupportedCPUs : 1;
282 
283  /// Output time trace profile.
284  unsigned TimeTrace : 1;
285 
286  /// Show the -version text.
287  unsigned ShowVersion : 1;
288 
289  /// Apply fixes even if there are unfixable errors.
290  unsigned FixWhatYouCan : 1;
291 
292  /// Apply fixes only for warnings.
293  unsigned FixOnlyWarnings : 1;
294 
295  /// Apply fixes and recompile.
296  unsigned FixAndRecompile : 1;
297 
298  /// Apply fixes to temporary files.
299  unsigned FixToTemporaries : 1;
300 
301  /// Emit ARC errors even if the migrator can fix them.
303 
304  /// Skip over function bodies to speed up parsing in cases you do not need
305  /// them (e.g. with code completion).
306  unsigned SkipFunctionBodies : 1;
307 
308  /// Whether we can use the global module index if available.
309  unsigned UseGlobalModuleIndex : 1;
310 
311  /// Whether we can generate the global module index if needed.
313 
314  /// Whether we include declaration dumps in AST dumps.
315  unsigned ASTDumpDecls : 1;
316 
317  /// Whether we deserialize all decls when forming AST dumps.
318  unsigned ASTDumpAll : 1;
319 
320  /// Whether we include lookup table dumps in AST dumps.
321  unsigned ASTDumpLookups : 1;
322 
323  /// Whether we include declaration type dumps in AST dumps.
324  unsigned ASTDumpDeclTypes : 1;
325 
326  /// Whether we are performing an implicit module build.
328 
329  /// Whether to use a filesystem lock when building implicit modules.
331 
332  /// Whether we should embed all used files into the PCM file.
333  unsigned ModulesEmbedAllFiles : 1;
334 
335  /// Whether timestamps should be written to the produced PCH file.
336  unsigned IncludeTimestamps : 1;
337 
338  /// Should a temporary file be used during compilation.
339  unsigned UseTemporary : 1;
340 
341  /// When using -emit-module, treat the modulemap as a system module.
342  unsigned IsSystemModule : 1;
343 
344  /// Output (and read) PCM files regardless of compiler errors.
346 
347  /// Whether to share the FileManager when building modules.
349 
351 
352  /// Specifies the output format of the AST.
354 
355  enum {
361 
362  enum {
364 
365  /// Enable migration to modern ObjC literals.
367 
368  /// Enable migration to modern ObjC subscripting.
370 
371  /// Enable migration to modern ObjC readonly property.
373 
374  /// Enable migration to modern ObjC readwrite property.
376 
377  /// Enable migration to modern ObjC property.
379 
380  /// Enable annotation of ObjCMethods of all kinds.
382 
383  /// Enable migration of ObjC methods to 'instancetype'.
385 
386  /// Enable migration to NS_ENUM/NS_OPTIONS macros.
388 
389  /// Enable migration to add conforming protocols.
391 
392  /// prefer 'atomic' property over 'nonatomic'.
394 
395  /// annotate property with NS_RETURNS_INNER_POINTER
397 
398  /// use NS_NONATOMIC_IOSONLY for property 'atomic' attribute
400 
401  /// Enable inferring NS_DESIGNATED_INITIALIZER for ObjC methods.
403 
404  /// Enable converting setter/getter expressions to property-dot syntx.
406 
414  };
417 
420 
421  /// The input kind, either specified via -x argument or deduced from the input
422  /// file name.
424 
425  /// The input files and their types.
427 
428  /// When the input is a module map, the original module map file from which
429  /// that map was inferred, if any (for umbrella modules).
431 
432  /// The output file, if any.
434 
435  /// If given, the new suffix for fix-it rewritten files.
437 
438  /// If given, filter dumped AST Decl nodes by this substring.
440 
441  /// If given, enable code completion at the provided location.
443 
444  /// The frontend action to perform.
446 
447  /// The name of the action to run when using a plugin action.
449 
450  // Currently this is only used as part of the `-extract-api` action.
451  /// The name of the product the input files belong too.
453 
454  // Currently this is only used as part of the `-extract-api` action.
455  /// The file providing a list of APIs to ignore when extracting documentation
457 
458  /// Args to pass to the plugins
459  std::map<std::string, std::vector<std::string>> PluginArgs;
460 
461  /// The list of plugin actions to run in addition to the normal action.
462  std::vector<std::string> AddPluginActions;
463 
464  /// The list of plugins to load.
465  std::vector<std::string> Plugins;
466 
467  /// The list of module file extensions.
468  std::vector<std::shared_ptr<ModuleFileExtension>> ModuleFileExtensions;
469 
470  /// The list of module map files to load before processing the input.
471  std::vector<std::string> ModuleMapFiles;
472 
473  /// The list of additional prebuilt module files to load before
474  /// processing the input.
475  std::vector<std::string> ModuleFiles;
476 
477  /// The list of files to embed into the compiled module file.
478  std::vector<std::string> ModulesEmbedFiles;
479 
480  /// The list of AST files to merge.
481  std::vector<std::string> ASTMergeFiles;
482 
483  /// A list of arguments to forward to LLVM's option processing; this
484  /// should only be used for debugging and experimental features.
485  std::vector<std::string> LLVMArgs;
486 
487  /// File name of the file that will provide record layouts
488  /// (in the format produced by -fdump-record-layouts).
490 
491  /// Auxiliary triple for CUDA/HIP compilation.
493 
494  /// Auxiliary target CPU for CUDA/HIP compilation.
496 
497  /// Auxiliary target features for CUDA/HIP compilation.
499 
500  /// Filename to write statistics to.
502 
503  /// Minimum time granularity (in microseconds) traced by time profiler.
505 
506  /// Path which stores the output files for -ftime-trace
508 
509 public:
521  TimeTraceGranularity(500) {}
522 
523  /// getInputKindForExtension - Return the appropriate input kind for a file
524  /// extension. For example, "c" would return Language::C.
525  ///
526  /// \return The input kind for the extension, or Language::Unknown if the
527  /// extension is not recognized.
528  static InputKind getInputKindForExtension(StringRef Extension);
529 };
530 
531 } // namespace clang
532 
533 #endif // LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H
clang::InputKind::HeaderUnitKind
HeaderUnitKind
Definition: FrontendOptions.h:167
clang::FrontendOptions::ObjCMT_ProtocolConformance
@ ObjCMT_ProtocolConformance
Enable migration to add conforming protocols.
Definition: FrontendOptions.h:390
clang::FrontendOptions::ModuleMapFiles
std::vector< std::string > ModuleMapFiles
The list of module map files to load before processing the input.
Definition: FrontendOptions.h:471
clang::InputKind::HeaderUnit_User
@ HeaderUnit_User
Definition: FrontendOptions.h:169
clang::FrontendOptions::AddPluginActions
std::vector< std::string > AddPluginActions
The list of plugin actions to run in addition to the normal action.
Definition: FrontendOptions.h:462
clang::FrontendOptions::FixAndRecompile
unsigned FixAndRecompile
Apply fixes and recompile.
Definition: FrontendOptions.h:296
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::FrontendOptions::ObjCMT_MigrateAll
@ ObjCMT_MigrateAll
Definition: FrontendOptions.h:412
clang::FrontendOptions::ARCMT_Migrate
@ ARCMT_Migrate
Definition: FrontendOptions.h:359
clang::FrontendOptions::ARCMT_Modify
@ ARCMT_Modify
Definition: FrontendOptions.h:358
clang::InputKind::isObjectiveC
bool isObjectiveC() const
Is the language of the input some dialect of Objective-C?
Definition: FrontendOptions.h:192
clang::InputKind::Format
Format
The input file format.
Definition: FrontendOptions.h:158
clang::frontend::EmitAssembly
@ EmitAssembly
Emit a .s file.
Definition: FrontendOptions.h:58
clang::DeclaratorContext::File
@ File
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::InputKind::isHeaderUnit
bool isHeaderUnit() const
Definition: FrontendOptions.h:186
clang::frontend::RewriteTest
@ RewriteTest
Rewriter playground.
Definition: FrontendOptions.h:127
clang::FrontendInputFile::getKind
InputKind getKind() const
Definition: FrontendOptions.h:241
clang::FrontendOptions::ARCMT_None
@ ARCMT_None
Definition: FrontendOptions.h:356
clang::FrontendOptions::ProgramAction
frontend::ActionKind ProgramAction
The frontend action to perform.
Definition: FrontendOptions.h:445
clang::FrontendOptions::ShowStats
unsigned ShowStats
Show frontend performance metrics and statistics.
Definition: FrontendOptions.h:278
llvm::SmallVector
Definition: LLVM.h:38
clang::FrontendOptions::TimeTracePath
std::string TimeTracePath
Path which stores the output files for -ftime-trace.
Definition: FrontendOptions.h:507
clang::FrontendOptions::LLVMArgs
std::vector< std::string > LLVMArgs
A list of arguments to forward to LLVM's option processing; this should only be used for debugging an...
Definition: FrontendOptions.h:485
clang::FrontendOptions::PluginArgs
std::map< std::string, std::vector< std::string > > PluginArgs
Args to pass to the plugins.
Definition: FrontendOptions.h:459
clang::FrontendOptions::SkipFunctionBodies
unsigned SkipFunctionBodies
Skip over function bodies to speed up parsing in cases you do not need them (e.g.
Definition: FrontendOptions.h:306
clang::FrontendOptions::ARCMTMigrateReportOut
std::string ARCMTMigrateReportOut
Definition: FrontendOptions.h:419
clang::frontend::ModuleFileInfo
@ ModuleFileInfo
Dump information about a module file.
Definition: FrontendOptions.h:103
clang::frontend::RunPreprocessorOnly
@ RunPreprocessorOnly
Just lex, no output.
Definition: FrontendOptions.h:139
clang::FrontendOptions::ObjCMT_Annotation
@ ObjCMT_Annotation
Enable annotation of ObjCMethods of all kinds.
Definition: FrontendOptions.h:381
clang::FrontendInputFile
An input file for the front end.
Definition: FrontendOptions.h:218
clang::InputKind::withHeaderUnit
InputKind withHeaderUnit(HeaderUnitKind HU) const
Definition: FrontendOptions.h:206
clang::FrontendOptions::ObjCMT_None
@ ObjCMT_None
Definition: FrontendOptions.h:363
clang::ParsedSourceLocation
A source location that has been parsed on the command line.
Definition: CommandLineSourceLoc.h:24
llvm::Optional< llvm::MemoryBufferRef >
clang::FrontendOptions::TimeTraceGranularity
unsigned TimeTraceGranularity
Minimum time granularity (in microseconds) traced by time profiler.
Definition: FrontendOptions.h:504
clang::FrontendOptions::ObjCMT_AtomicProperty
@ ObjCMT_AtomicProperty
prefer 'atomic' property over 'nonatomic'.
Definition: FrontendOptions.h:393
clang::frontend::ASTDump
@ ASTDump
Parse ASTs and dump them.
Definition: FrontendOptions.h:40
clang::InputKind
The kind of a file that we've been handed as an input.
Definition: FrontendOptions.h:148
clang::frontend::VerifyPCH
@ VerifyPCH
Load and verify that a PCH file is usable.
Definition: FrontendOptions.h:106
clang::frontend::PluginAction
@ PluginAction
Run a plugin action,.
Definition: FrontendOptions.h:112
clang::frontend::RewriteObjC
@ RewriteObjC
ObjC->C Rewriter.
Definition: FrontendOptions.h:124
clang::InputKind::Source
@ Source
Definition: FrontendOptions.h:159
clang::FrontendOptions::AuxTargetFeatures
Optional< std::vector< std::string > > AuxTargetFeatures
Auxiliary target features for CUDA/HIP compilation.
Definition: FrontendOptions.h:498
clang::FrontendOptions::PrintSupportedCPUs
unsigned PrintSupportedCPUs
print the supported cpus for the current target
Definition: FrontendOptions.h:281
clang::FrontendInputFile::getFile
StringRef getFile() const
Definition: FrontendOptions.h:253
clang::FrontendOptions::ShowVersion
unsigned ShowVersion
Show the -version text.
Definition: FrontendOptions.h:287
clang::FrontendOptions::ExtractAPIIgnoresFile
std::string ExtractAPIIgnoresFile
The file providing a list of APIs to ignore when extracting documentation.
Definition: FrontendOptions.h:456
clang::FrontendOptions::Inputs
SmallVector< FrontendInputFile, 0 > Inputs
The input files and their types.
Definition: FrontendOptions.h:426
clang::FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty
@ ObjCMT_NsAtomicIOSOnlyProperty
use NS_NONATOMIC_IOSONLY for property 'atomic' attribute
Definition: FrontendOptions.h:399
clang::frontend::GeneratePCH
@ GeneratePCH
Generate pre-compiled header.
Definition: FrontendOptions.h:94
clang::FrontendOptions::ProductName
std::string ProductName
The name of the product the input files belong too.
Definition: FrontendOptions.h:452
clang::FrontendOptions::OverrideRecordLayoutsFile
std::string OverrideRecordLayoutsFile
File name of the file that will provide record layouts (in the format produced by -fdump-record-layou...
Definition: FrontendOptions.h:489
clang::FrontendOptions::ModulesEmbedAllFiles
unsigned ModulesEmbedAllFiles
Whether we should embed all used files into the PCM file.
Definition: FrontendOptions.h:333
clang::frontend::ASTView
@ ASTView
Parse ASTs and view them in Graphviz.
Definition: FrontendOptions.h:46
clang::FrontendOptions::ShowHelp
unsigned ShowHelp
Show the -help text.
Definition: FrontendOptions.h:275
clang::FrontendOptions::AuxTargetCPU
Optional< std::string > AuxTargetCPU
Auxiliary target CPU for CUDA/HIP compilation.
Definition: FrontendOptions.h:495
clang::FrontendOptions::ASTDumpFormat
ASTDumpOutputFormat ASTDumpFormat
Specifies the output format of the AST.
Definition: FrontendOptions.h:353
clang::frontend::ASTPrint
@ ASTPrint
Parse ASTs and print them.
Definition: FrontendOptions.h:43
clang::FrontendOptions::FrontendOptions
FrontendOptions()
Definition: FrontendOptions.h:510
clang::FrontendOptions::ASTDumpDecls
unsigned ASTDumpDecls
Whether we include declaration dumps in AST dumps.
Definition: FrontendOptions.h:315
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile(StringRef File, InputKind Kind, bool IsSystem=false)
Definition: FrontendOptions.h:235
clang::FrontendInputFile::getBuffer
llvm::MemoryBufferRef getBuffer() const
Definition: FrontendOptions.h:258
clang::frontend::RunAnalysis
@ RunAnalysis
Run one or more source code analyses.
Definition: FrontendOptions.h:130
clang::frontend::EmitObj
@ EmitObj
Emit a .o file.
Definition: FrontendOptions.h:76
clang::FrontendOptions::getInputKindForExtension
static InputKind getInputKindForExtension(StringRef Extension)
getInputKindForExtension - Return the appropriate input kind for a file extension.
Definition: FrontendOptions.cpp:15
clang::frontend::ActionKind
ActionKind
Definition: FrontendOptions.h:35
CodeCompleteOptions.h
clang::FrontendOptions::UseTemporary
unsigned UseTemporary
Should a temporary file be used during compilation.
Definition: FrontendOptions.h:339
clang::FrontendOptions::OutputFile
std::string OutputFile
The output file, if any.
Definition: FrontendOptions.h:433
clang::FrontendOptions::ASTDumpFilter
std::string ASTDumpFilter
If given, filter dumped AST Decl nodes by this substring.
Definition: FrontendOptions.h:439
clang::FrontendOptions::AuxTriple
std::string AuxTriple
Auxiliary triple for CUDA/HIP compilation.
Definition: FrontendOptions.h:492
clang::FrontendInputFile::getHeaderUnitKind
InputKind::HeaderUnitKind getHeaderUnitKind() const
Definition: FrontendOptions.h:249
clang::frontend::ParseSyntaxOnly
@ ParseSyntaxOnly
Parse and perform semantic analysis.
Definition: FrontendOptions.h:109
clang::ASTDumpOutputFormat
ASTDumpOutputFormat
Used to specify the format for printing AST dump information.
Definition: ASTDumperUtils.h:21
clang::FrontendOptions
FrontendOptions - Options for controlling the behavior of the frontend.
Definition: FrontendOptions.h:265
ASTDumperUtils.h
clang::frontend::ASTDeclList
@ ASTDeclList
Parse ASTs and list Decl nodes.
Definition: FrontendOptions.h:37
clang::InputKind::isUnknown
bool isUnknown() const
Is the input kind fully-unknown?
Definition: FrontendOptions.h:189
clang::InputKind::HeaderUnit_Abs
@ HeaderUnit_Abs
Definition: FrontendOptions.h:171
clang::InputKind::getHeader
InputKind getHeader() const
Definition: FrontendOptions.h:201
clang::frontend::DumpRawTokens
@ DumpRawTokens
Dump out raw tokens.
Definition: FrontendOptions.h:52
clang::InputKind::getLanguage
Language getLanguage() const
Definition: FrontendOptions.h:179
clang::frontend::EmitLLVM
@ EmitLLVM
Emit a .ll file.
Definition: FrontendOptions.h:67
clang::FrontendOptions::ASTDumpDeclTypes
unsigned ASTDumpDeclTypes
Whether we include declaration type dumps in AST dumps.
Definition: FrontendOptions.h:324
clang::FrontendInputFile::isBuffer
bool isBuffer() const
Definition: FrontendOptions.h:246
clang::InputKind::Precompiled
@ Precompiled
Definition: FrontendOptions.h:161
clang::FrontendOptions::StatsFile
std::string StatsFile
Filename to write statistics to.
Definition: FrontendOptions.h:501
clang::FrontendOptions::ObjCMT_MigrateDecls
@ ObjCMT_MigrateDecls
Definition: FrontendOptions.h:407
clang::FrontendOptions::ASTDumpAll
unsigned ASTDumpAll
Whether we deserialize all decls when forming AST dumps.
Definition: FrontendOptions.h:318
clang::InputKind::getPreprocessed
InputKind getPreprocessed() const
Definition: FrontendOptions.h:196
clang::FrontendOptions::ObjCMT_PropertyDotSyntax
@ ObjCMT_PropertyDotSyntax
Enable converting setter/getter expressions to property-dot syntx.
Definition: FrontendOptions.h:405
clang::FrontendOptions::ObjCMTAction
unsigned ObjCMTAction
Definition: FrontendOptions.h:415
clang::FrontendInputFile::isFile
bool isFile() const
Definition: FrontendOptions.h:245
clang::FrontendOptions::FixToTemporaries
unsigned FixToTemporaries
Apply fixes to temporary files.
Definition: FrontendOptions.h:299
clang::frontend::PrintDependencyDirectivesSourceMinimizerOutput
@ PrintDependencyDirectivesSourceMinimizerOutput
Print the output of the dependency directives source minimizer.
Definition: FrontendOptions.h:142
clang::FrontendOptions::ASTMergeFiles
std::vector< std::string > ASTMergeFiles
The list of AST files to merge.
Definition: FrontendOptions.h:481
clang::frontend::EmitHTML
@ EmitHTML
Translate input source into HTML.
Definition: FrontendOptions.h:64
clang::InputKind::isHeader
bool isHeader() const
Definition: FrontendOptions.h:185
clang::FrontendOptions::DashX
InputKind DashX
The input kind, either specified via -x argument or deduced from the input file name.
Definition: FrontendOptions.h:423
clang::frontend::RewriteMacros
@ RewriteMacros
Expand macros but not #includes.
Definition: FrontendOptions.h:121
clang::FrontendOptions::ModulesEmbedFiles
std::vector< std::string > ModulesEmbedFiles
The list of files to embed into the compiled module file.
Definition: FrontendOptions.h:478
clang::FrontendOptions::UseGlobalModuleIndex
unsigned UseGlobalModuleIndex
Whether we can use the global module index if available.
Definition: FrontendOptions.h:309
clang::FrontendOptions::AllowPCMWithCompilerErrors
unsigned AllowPCMWithCompilerErrors
Output (and read) PCM files regardless of compiler errors.
Definition: FrontendOptions.h:345
clang::FrontendOptions::ASTDumpLookups
unsigned ASTDumpLookups
Whether we include lookup table dumps in AST dumps.
Definition: FrontendOptions.h:321
clang::FrontendOptions::FixOnlyWarnings
unsigned FixOnlyWarnings
Apply fixes only for warnings.
Definition: FrontendOptions.h:293
clang::FrontendOptions::ARCMT_Check
@ ARCMT_Check
Definition: FrontendOptions.h:357
clang::InputKind::getFormat
Format getFormat() const
Definition: FrontendOptions.h:180
clang::FrontendInputFile::isSystem
bool isSystem() const
Definition: FrontendOptions.h:242
clang::FrontendInputFile::isHeader
bool isHeader() const
Definition: FrontendOptions.h:248
clang::FrontendOptions::TimeTrace
unsigned TimeTrace
Output time trace profile.
Definition: FrontendOptions.h:284
clang::FrontendOptions::ModuleFileExtensions
std::vector< std::shared_ptr< ModuleFileExtension > > ModuleFileExtensions
The list of module file extensions.
Definition: FrontendOptions.h:468
clang::InputKind::ModuleMap
@ ModuleMap
Definition: FrontendOptions.h:160
clang::FrontendOptions::ARCMTAction
enum clang::FrontendOptions::@189 ARCMTAction
clang::frontend::EmitBC
@ EmitBC
Emit a .bc file.
Definition: FrontendOptions.h:61
clang::frontend::GenerateHeaderUnit
@ GenerateHeaderUnit
Generate a C++20 header unit module from a header file.
Definition: FrontendOptions.h:91
clang::FrontendInputFile::isPreprocessed
bool isPreprocessed() const
Definition: FrontendOptions.h:247
clang::InputKind::InputKind
constexpr InputKind(Language L=Language::Unknown, Format F=Source, bool PP=false, HeaderUnitKind HU=HeaderUnit_None, bool HD=false)
Definition: FrontendOptions.h:174
clang::FrontendOptions::CodeCompleteOpts
CodeCompleteOptions CodeCompleteOpts
Definition: FrontendOptions.h:350
false
#define false
Definition: stdbool.h:22
clang::Language
Language
The language for the input, used to select and validate the language standard and possible actions.
Definition: LangStandard.h:23
clang::FrontendOptions::ObjCMT_ReadonlyProperty
@ ObjCMT_ReadonlyProperty
Enable migration to modern ObjC readonly property.
Definition: FrontendOptions.h:372
clang::FrontendOptions::IsSystemModule
unsigned IsSystemModule
When using -emit-module, treat the modulemap as a system module.
Definition: FrontendOptions.h:342
LangStandard.h
clang::frontend::GenerateModule
@ GenerateModule
Generate pre-compiled module from a module map.
Definition: FrontendOptions.h:85
clang::FrontendOptions::ObjCMT_Property
@ ObjCMT_Property
Enable migration to modern ObjC property.
Definition: FrontendOptions.h:378
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile(llvm::MemoryBufferRef Buffer, InputKind Kind, bool IsSystem=false)
Definition: FrontendOptions.h:237
clang::FrontendOptions::ObjCMT_NsMacros
@ ObjCMT_NsMacros
Enable migration to NS_ENUM/NS_OPTIONS macros.
Definition: FrontendOptions.h:387
clang::FrontendOptions::FixItSuffix
std::string FixItSuffix
If given, the new suffix for fix-it rewritten files.
Definition: FrontendOptions.h:436
clang::Language::ObjCXX
@ ObjCXX
clang::frontend::FixIt
@ FixIt
Parse and apply any fixits to the source.
Definition: FrontendOptions.h:82
clang::FrontendOptions::ObjCMT_DesignatedInitializer
@ ObjCMT_DesignatedInitializer
Enable inferring NS_DESIGNATED_INITIALIZER for ObjC methods.
Definition: FrontendOptions.h:402
clang::FrontendOptions::Plugins
std::vector< std::string > Plugins
The list of plugins to load.
Definition: FrontendOptions.h:465
clang::frontend::ExtractAPI
@ ExtractAPI
Definition: FrontendOptions.h:79
clang::Language::ObjC
@ ObjC
clang::FrontendOptions::ActionName
std::string ActionName
The name of the action to run when using a plugin action.
Definition: FrontendOptions.h:448
clang::FrontendOptions::GenerateGlobalModuleIndex
unsigned GenerateGlobalModuleIndex
Whether we can generate the global module index if needed.
Definition: FrontendOptions.h:312
ModuleFileExtension.h
clang::InputKind::HeaderUnit_None
@ HeaderUnit_None
Definition: FrontendOptions.h:168
clang::FrontendOptions::BuildingImplicitModule
unsigned BuildingImplicitModule
Whether we are performing an implicit module build.
Definition: FrontendOptions.h:327
clang::FrontendOptions::ARCMTMigrateEmitARCErrors
unsigned ARCMTMigrateEmitARCErrors
Emit ARC errors even if the migrator can fix them.
Definition: FrontendOptions.h:302
clang::FrontendInputFile::isEmpty
bool isEmpty() const
Definition: FrontendOptions.h:244
clang::FrontendOptions::ObjCMT_ReadwriteProperty
@ ObjCMT_ReadwriteProperty
Enable migration to modern ObjC readwrite property.
Definition: FrontendOptions.h:375
clang::FrontendOptions::ModuleFiles
std::vector< std::string > ModuleFiles
The list of additional prebuilt module files to load before processing the input.
Definition: FrontendOptions.h:475
clang::FrontendOptions::OriginalModuleMap
std::string OriginalModuleMap
When the input is a module map, the original module map file from which that map was inferred,...
Definition: FrontendOptions.h:430
clang::FrontendOptions::ObjCMTAllowListPath
std::string ObjCMTAllowListPath
Definition: FrontendOptions.h:416
clang
Definition: CalledOnceCheck.h:17
clang::frontend::DumpTokens
@ DumpTokens
Dump out preprocessed tokens.
Definition: FrontendOptions.h:55
clang::FrontendOptions::ModulesShareFileManager
unsigned ModulesShareFileManager
Whether to share the FileManager when building modules.
Definition: FrontendOptions.h:348
clang::FrontendOptions::BuildingImplicitModuleUsesLock
unsigned BuildingImplicitModuleUsesLock
Whether to use a filesystem lock when building implicit modules.
Definition: FrontendOptions.h:330
clang::FrontendOptions::ObjCMT_ReturnsInnerPointerProperty
@ ObjCMT_ReturnsInnerPointerProperty
annotate property with NS_RETURNS_INNER_POINTER
Definition: FrontendOptions.h:396
clang::ADOF_Default
@ ADOF_Default
Definition: ASTDumperUtils.h:22
clang::FrontendOptions::ObjCMT_Subscripting
@ ObjCMT_Subscripting
Enable migration to modern ObjC subscripting.
Definition: FrontendOptions.h:369
clang::InputKind::getHeaderUnitKind
HeaderUnitKind getHeaderUnitKind() const
Definition: FrontendOptions.h:181
clang::FrontendOptions::IncludeTimestamps
unsigned IncludeTimestamps
Whether timestamps should be written to the produced PCH file.
Definition: FrontendOptions.h:336
clang::frontend::DumpCompilerOptions
@ DumpCompilerOptions
Dump the compiler configuration.
Definition: FrontendOptions.h:49
clang::FrontendOptions::ObjCMT_Instancetype
@ ObjCMT_Instancetype
Enable migration of ObjC methods to 'instancetype'.
Definition: FrontendOptions.h:384
clang::CodeCompleteOptions
Options controlling the behavior of code completion.
Definition: CodeCompleteOptions.h:15
clang::FrontendOptions::MTMigrateDir
std::string MTMigrateDir
Definition: FrontendOptions.h:418
clang::FrontendOptions::FixWhatYouCan
unsigned FixWhatYouCan
Apply fixes even if there are unfixable errors.
Definition: FrontendOptions.h:290
clang::Language::Unknown
@ Unknown
clang::FrontendOptions::RelocatablePCH
unsigned RelocatablePCH
When generating PCH files, instruct the AST writer to create relocatable PCH files.
Definition: FrontendOptions.h:272
clang::FrontendOptions::DisableFree
unsigned DisableFree
Disable memory freeing on exit.
Definition: FrontendOptions.h:268
clang::frontend::PrintPreprocessedInput
@ PrintPreprocessedInput
-E mode.
Definition: FrontendOptions.h:118
clang::InputKind::HeaderUnit_System
@ HeaderUnit_System
Definition: FrontendOptions.h:170
true
#define true
Definition: stdbool.h:21
clang::FrontendOptions::ObjCMT_Literals
@ ObjCMT_Literals
Enable migration to modern ObjC literals.
Definition: FrontendOptions.h:366
clang::frontend::EmitLLVMOnly
@ EmitLLVMOnly
Generate LLVM IR, but do not emit anything.
Definition: FrontendOptions.h:70
clang::frontend::MigrateSource
@ MigrateSource
Run migrator.
Definition: FrontendOptions.h:136
clang::InputKind::withFormat
InputKind withFormat(Format F) const
Definition: FrontendOptions.h:211
clang::frontend::GenerateInterfaceStubs
@ GenerateInterfaceStubs
Generate Interface Stub Files.
Definition: FrontendOptions.h:97
clang::InputKind::isPreprocessed
bool isPreprocessed() const
Definition: FrontendOptions.h:184
clang::frontend::InitOnly
@ InitOnly
Only execute frontend initialization.
Definition: FrontendOptions.h:100
clang::FrontendInputFile::FrontendInputFile
FrontendInputFile()=default
CommandLineSourceLoc.h
clang::FrontendOptions::CodeCompletionAt
ParsedSourceLocation CodeCompletionAt
If given, enable code completion at the provided location.
Definition: FrontendOptions.h:442
clang::frontend::PrintPreamble
@ PrintPreamble
Print the "preamble" of the input file.
Definition: FrontendOptions.h:115
clang::frontend::TemplightDump
@ TemplightDump
Dump template instantiations.
Definition: FrontendOptions.h:133
clang::frontend::GenerateModuleInterface
@ GenerateModuleInterface
Generate pre-compiled module from a C++ module interface file.
Definition: FrontendOptions.h:88
clang::frontend::EmitCodeGenOnly
@ EmitCodeGenOnly
Generate machine code, but don't emit anything.
Definition: FrontendOptions.h:73