diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
commit | 173a4f43a911175643bda81ee675e8d9269056ea (patch) | |
tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /include/clang/Frontend/CompilerInvocation.h | |
parent | 88f7a7d5251a2d813460274c92decc143a11569b (diff) | |
download | FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz |
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r-- | include/clang/Frontend/CompilerInvocation.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index f64773c..f05ab80 100644 --- a/include/clang/Frontend/CompilerInvocation.h +++ b/include/clang/Frontend/CompilerInvocation.h @@ -47,15 +47,17 @@ class DiagnosticsEngine; /// When errors are encountered, return false and, if Diags is non-null, /// report the error(s). bool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args, - DiagnosticsEngine *Diags = 0); + DiagnosticsEngine *Diags = nullptr); class CompilerInvocationBase : public RefCountedBase<CompilerInvocation> { -protected: + void operator=(const CompilerInvocationBase &) LLVM_DELETED_FUNCTION; + +public: /// Options controlling the language variant. - IntrusiveRefCntPtr<LangOptions> LangOpts; + std::shared_ptr<LangOptions> LangOpts; /// Options controlling the target. - IntrusiveRefCntPtr<TargetOptions> TargetOpts; + std::shared_ptr<TargetOptions> TargetOpts; /// Options controlling the diagnostic engine. IntrusiveRefCntPtr<DiagnosticOptions> DiagnosticOpts; @@ -66,17 +68,17 @@ protected: /// Options controlling the preprocessor (aside from \#include handling). IntrusiveRefCntPtr<PreprocessorOptions> PreprocessorOpts; -public: CompilerInvocationBase(); + ~CompilerInvocationBase(); CompilerInvocationBase(const CompilerInvocationBase &X); - LangOptions *getLangOpts() { return LangOpts.getPtr(); } - const LangOptions *getLangOpts() const { return LangOpts.getPtr(); } + LangOptions *getLangOpts() { return LangOpts.get(); } + const LangOptions *getLangOpts() const { return LangOpts.get(); } - TargetOptions &getTargetOpts() { return *TargetOpts.getPtr(); } + TargetOptions &getTargetOpts() { return *TargetOpts.get(); } const TargetOptions &getTargetOpts() const { - return *TargetOpts.getPtr(); + return *TargetOpts.get(); } DiagnosticOptions &getDiagnosticOpts() const { return *DiagnosticOpts; } @@ -204,6 +206,14 @@ public: /// @} }; +namespace vfs { + class FileSystem; +} + +IntrusiveRefCntPtr<vfs::FileSystem> +createVFSFromCompilerInvocation(const CompilerInvocation &CI, + DiagnosticsEngine &Diags); + } // end namespace clang #endif |