10 #ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
11 #define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
26 #include "llvm/ADT/IntrusiveRefCntPtr.h"
27 #include "llvm/ADT/StringMap.h"
28 #include "llvm/ADT/StringRef.h"
39 class CompilerInvocation;
40 class DiagnosticsEngine;
50 DiagnosticsEngine *Diags =
nullptr);
137 const char*
const *ArgBegin,
138 const char*
const *ArgEnd,
183 return DependencyOutputOpts;
186 return DependencyOutputOpts;
191 return FileSystemOpts;
200 return PreprocessorOutputOpts;
203 return PreprocessorOutputOpts;
213 IntrusiveRefCntPtr<vfs::FileSystem>
215 DiagnosticsEngine &Diags);
HeaderSearchOptions & getHeaderSearchOpts()
TargetOptions & getTargetOpts()
DependencyOutputOptions & getDependencyOutputOpts()
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.
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.
IntrusiveRefCntPtr< PreprocessorOptions > PreprocessorOpts
Options controlling the preprocessor (aside from #include handling).
const PreprocessorOutputOptions & getPreprocessorOutputOpts() const
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
CodeGenOptions & getCodeGenOpts()
Concrete class used by the front-end to report problems and issues.
const FrontendOptions & getFrontendOpts() const
PreprocessorOutputOptions & getPreprocessorOutputOpts()
FrontendOptions & getFrontendOpts()
MigratorOptions & getMigratorOpts()
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)
bool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args, DiagnosticsEngine *Diags=nullptr)
Fill out Opts based on the options given in Args.
Options for controlling the compiler diagnostics engine.
AnalyzerOptionsRef getAnalyzerOpts() const
Defines the clang::TargetOptions class.
std::shared_ptr< TargetOptions > TargetOpts
Options controlling the target.
static void setLangDefaults(LangOptions &Opts, InputKind IK, LangStandard::Kind LangStd=LangStandard::lang_unspecified)
Set language defaults for the given input language and language standard in the given LangOptions obj...
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
IntrusiveRefCntPtr< DiagnosticOptions > DiagnosticOpts
Options controlling the diagnostic engine.
IntrusiveRefCntPtr< HeaderSearchOptions > HeaderSearchOpts
Options controlling the #include directive.
~CompilerInvocationBase()
Keeps track of options that affect how file operations are performed.
FileSystemOptions & getFileSystemOpts()
LangOptions * getLangOpts()
const HeaderSearchOptions & getHeaderSearchOpts() const