diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-01-05 19:48:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-01-05 19:48:10 +0000 |
commit | 48cafe3de28bdac87ca3221fc2cc14fa522dfb29 (patch) | |
tree | 92a79eb6f4e8795a1ea7536f7aeddbe6e2f19819 /lib/Frontend/SerializedDiagnosticPrinter.cpp | |
parent | 5a12bb82d507cc3906d21f9249725a78e4ef7bdf (diff) |
Move SerializedDiagnosticPrinter's SharedState to std::shared_ptr rather than IntrusiveRefCntPtr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/SerializedDiagnosticPrinter.cpp')
-rw-r--r-- | lib/Frontend/SerializedDiagnosticPrinter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp index 3d85b648d0..7f88c919e2 100644 --- a/lib/Frontend/SerializedDiagnosticPrinter.cpp +++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp @@ -143,7 +143,7 @@ class SDiagsWriter : public DiagnosticConsumer { struct SharedState; - explicit SDiagsWriter(IntrusiveRefCntPtr<SharedState> State) + explicit SDiagsWriter(std::shared_ptr<SharedState> State) : LangOpts(nullptr), OriginalInstance(false), MergeChildRecords(false), State(std::move(State)) {} @@ -151,7 +151,7 @@ public: SDiagsWriter(StringRef File, DiagnosticOptions *Diags, bool MergeChildRecords) : LangOpts(nullptr), OriginalInstance(true), MergeChildRecords(MergeChildRecords), - State(new SharedState(File, Diags)) { + State(std::make_shared<SharedState>(File, Diags)) { if (MergeChildRecords) RemoveOldDiagnostics(); EmitPreamble(); @@ -251,7 +251,7 @@ private: /// \brief State that is shared among the various clones of this diagnostic /// consumer. - struct SharedState : RefCountedBase<SharedState> { + struct SharedState { SharedState(StringRef File, DiagnosticOptions *Diags) : DiagOpts(Diags), Stream(Buffer), OutputFile(File.str()), EmittedAnyDiagBlocks(false) {} @@ -299,7 +299,7 @@ private: }; /// \brief State shared among the various clones of this diagnostic consumer. - IntrusiveRefCntPtr<SharedState> State; + std::shared_ptr<SharedState> State; }; } // end anonymous namespace |