10 #ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
11 #define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
23 #include "llvm/ADT/IntrusiveRefCntPtr.h"
35 class PreprocessorOptions;
36 class HeaderSearchOptions;
39 class CompilerInvocation;
40 class DiagnosticsEngine;
50 DiagnosticsEngine *Diags =
nullptr,
51 bool DefaultDiagColor =
true,
52 bool DefaultShowOpt =
true);
145 const char*
const *ArgBegin,
146 const char*
const *ArgEnd,
194 return DependencyOutputOpts;
197 return DependencyOutputOpts;
202 return FileSystemOpts;
211 return PreprocessorOutputOpts;
214 return PreprocessorOutputOpts;
224 IntrusiveRefCntPtr<vfs::FileSystem>
226 DiagnosticsEngine &Diags);
228 IntrusiveRefCntPtr<vfs::FileSystem>
230 DiagnosticsEngine &Diags,
231 IntrusiveRefCntPtr<vfs::FileSystem> BaseFS);
HeaderSearchOptions & getHeaderSearchOpts()
bool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args, DiagnosticsEngine *Diags=nullptr, bool DefaultDiagColor=true, bool DefaultShowOpt=true)
Fill out Opts based on the options given in Args.
TargetOptions & getTargetOpts()
DependencyOutputOptions & getDependencyOutputOpts()
std::shared_ptr< HeaderSearchOptions > HeaderSearchOpts
Options controlling the #include directive.
static bool CreateFromArgs(CompilerInvocation &Res, const char *const *ArgBegin, const char *const *ArgEnd, DiagnosticsEngine &Diags)
Create a compiler invocation from a list of input options.
std::shared_ptr< LangOptions > LangOpts
Options controlling the language variant.
PreprocessorOptions - This class is used for passing the various options used in preprocessor initial...
const PreprocessorOptions & getPreprocessorOpts() const
std::string getModuleHash() const
Retrieve a module hash string that is suitable for uniquely identifying the conditions under which th...
Options for controlling the target.
const PreprocessorOutputOptions & getPreprocessorOutputOpts() const
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
std::shared_ptr< PreprocessorOptions > PreprocessorOpts
Options controlling the preprocessor (aside from #include handling).
std::shared_ptr< HeaderSearchOptions > getHeaderSearchOptsPtr() const
CodeGenOptions & getCodeGenOpts()
Concrete class used by the front-end to report problems and issues.
std::shared_ptr< PreprocessorOptions > getPreprocessorOptsPtr()
const FrontendOptions & getFrontendOpts() const
PreprocessorOutputOptions & getPreprocessorOutputOpts()
FrontendOptions & getFrontendOpts()
MigratorOptions & getMigratorOpts()
PreprocessorOutputOptions - Options for controlling the C preprocessor output (e.g., -E).
static void setLangDefaults(LangOptions &Opts, InputKind IK, const llvm::Triple &T, PreprocessorOptions &PPOpts, LangStandard::Kind LangStd=LangStandard::lang_unspecified)
Set language defaults for the given input language and language standard in the given LangOptions obj...
static std::string GetResourcesPath(const char *Argv0, void *MainAddr)
Get the directory where the compiler headers reside, relative to the compiler binary (found by the pa...
Defines the clang::LangOptions interface.
const LangOptions * getLangOpts() const
IntrusiveRefCntPtr< vfs::FileSystem > createVFSFromCompilerInvocation(const CompilerInvocation &CI, DiagnosticsEngine &Diags)
Options for controlling the compiler diagnostics engine.
AnalyzerOptionsRef getAnalyzerOpts() const
DependencyOutputOptions - Options for controlling the compiler dependency file generation.
std::shared_ptr< TargetOptions > TargetOpts
Options controlling the target.
const TargetOptions & getTargetOpts() const
const FileSystemOptions & getFileSystemOpts() const
const MigratorOptions & getMigratorOpts() const
PreprocessorOptions & getPreprocessorOpts()
Helper class for holding the data necessary to invoke the compiler.
DiagnosticOptions & getDiagnosticOpts() const
const CodeGenOptions & getCodeGenOpts() const
FrontendOptions - Options for controlling the behavior of the frontend.
Defines the clang::FileSystemOptions interface.
const DependencyOutputOptions & getDependencyOutputOpts() const
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
IntrusiveRefCntPtr< DiagnosticOptions > DiagnosticOpts
Options controlling the diagnostic engine.
~CompilerInvocationBase()
Keeps track of options that affect how file operations are performed.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
FileSystemOptions & getFileSystemOpts()
LangOptions * getLangOpts()
const HeaderSearchOptions & getHeaderSearchOpts() const