diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h index 1827ff0f6816d..f2c653d3075df 100644 --- a/clang/include/clang/Frontend/CompilerInvocation.h +++ b/clang/include/clang/Frontend/CompilerInvocation.h @@ -89,7 +89,7 @@ class CompilerInvocationBase { std::shared_ptr PPOpts; /// Options controlling the static analyzer. - AnalyzerOptionsRef AnalyzerOpts; + std::shared_ptr AnalyzerOpts; std::shared_ptr MigratorOpts; diff --git a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h index 2c970301879d2..54c2fb8a60ca1 100644 --- a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h +++ b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h @@ -176,7 +176,7 @@ class PositiveAnalyzerOption { /// and should be eventually converted into -analyzer-config flags. New analyzer /// options should not be implemented as frontend flags. Frontend flags still /// make sense for things that do not affect the actual analysis. -class AnalyzerOptions : public RefCountedBase { +class AnalyzerOptions { public: using ConfigTable = llvm::StringMap; @@ -416,8 +416,6 @@ class AnalyzerOptions : public RefCountedBase { } }; -using AnalyzerOptionsRef = IntrusiveRefCntPtr; - //===----------------------------------------------------------------------===// // We'll use AnalyzerOptions in the frontend, but we can't link the frontend // with clangStaticAnalyzerCore, because clangStaticAnalyzerCore depends on diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 1df503859204d..8ff62ae2552c3 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -142,7 +142,7 @@ CompilerInvocationBase::CompilerInvocationBase() DiagnosticOpts(llvm::makeIntrusiveRefCnt()), HSOpts(std::make_shared()), PPOpts(std::make_shared()), - AnalyzerOpts(llvm::makeIntrusiveRefCnt()), + AnalyzerOpts(std::make_shared()), MigratorOpts(std::make_shared()), APINotesOpts(std::make_shared()), CodeGenOpts(std::make_shared()), @@ -159,7 +159,7 @@ CompilerInvocationBase::deep_copy_assign(const CompilerInvocationBase &X) { DiagnosticOpts = makeIntrusiveRefCntCopy(X.getDiagnosticOpts()); HSOpts = make_shared_copy(X.getHeaderSearchOpts()); PPOpts = make_shared_copy(X.getPreprocessorOpts()); - AnalyzerOpts = makeIntrusiveRefCntCopy(X.getAnalyzerOpts()); + AnalyzerOpts = make_shared_copy(X.getAnalyzerOpts()); MigratorOpts = make_shared_copy(X.getMigratorOpts()); APINotesOpts = make_shared_copy(X.getAPINotesOpts()); CodeGenOpts = make_shared_copy(X.getCodeGenOpts());