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