#include "clang/Basic/LLVM.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Visibility.h"
-#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include <string>
namespace clang {
/// \brief Keeps track of the various options that can be
/// enabled, which controls the dialect of C or C++ that is accepted.
-class LangOptions : public RefCountedBase<LangOptions>, public LangOptionsBase {
+class LangOptions : public LangOptionsBase {
public:
typedef clang::Visibility Visibility;
};
private:
- IntrusiveRefCntPtr<LangOptions> LangOpts;
+ std::shared_ptr<LangOptions> LangOpts;
IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics;
IntrusiveRefCntPtr<FileManager> FileMgr;
IntrusiveRefCntPtr<SourceManager> SourceMgr;
class CompilerInvocationBase : public RefCountedBase<CompilerInvocation> {
void operator=(const CompilerInvocationBase &) LLVM_DELETED_FUNCTION;
-protected:
+public:
/// Options controlling the language variant.
- IntrusiveRefCntPtr<LangOptions> LangOpts;
+ std::shared_ptr<LangOptions> LangOpts;
/// Options controlling the target.
IntrusiveRefCntPtr<TargetOptions> TargetOpts;
/// Options controlling the preprocessor (aside from \#include handling).
IntrusiveRefCntPtr<PreprocessorOptions> PreprocessorOpts;
-public:
CompilerInvocationBase();
~CompilerInvocationBase();
"IR inputs not support here!");
// Configure the various subsystems.
- LangOpts = &Clang->getLangOpts();
+ LangOpts = Clang->getInvocation().LangOpts;
FileSystemOpts = Clang->getFileSystemOpts();
IntrusiveRefCntPtr<vfs::FileSystem> VFS =
createVFSFromCompilerInvocation(Clang->getInvocation(), getDiagnostics());
// Steal the created target, context, and preprocessor if they have been
// created.
assert(CI.hasInvocation() && "missing invocation");
- LangOpts = CI.getInvocation().getLangOpts();
+ LangOpts = CI.getInvocation().LangOpts;
TheSema.reset(CI.takeSema());
Consumer.reset(CI.takeASTConsumer());
if (CI.hasASTContext())