struct SharedState;
- explicit SDiagsWriter(IntrusiveRefCntPtr<SharedState> State)
+ explicit SDiagsWriter(std::shared_ptr<SharedState> State)
: LangOpts(nullptr), OriginalInstance(false), MergeChildRecords(false),
State(std::move(State)) {}
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();
/// \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) {}
};
/// \brief State shared among the various clones of this diagnostic consumer.
- IntrusiveRefCntPtr<SharedState> State;
+ std::shared_ptr<SharedState> State;
};
} // end anonymous namespace