From 02c23ebf41ae2f70da0ba7337e05c51fbfe35f7f Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 23 Oct 2012 22:26:28 +0000 Subject: Make DiagnosticOptions intrusively reference-counted, and make sure the various stakeholders bump up the reference count. In particular, the diagnostics engine now keeps the DiagnosticOptions object alive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/ASTMerge.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Frontend/ASTMerge.cpp') diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp index 9feb3de4f0..31b1df43df 100644 --- a/lib/Frontend/ASTMerge.cpp +++ b/lib/Frontend/ASTMerge.cpp @@ -41,8 +41,9 @@ void ASTMergeAction::ExecuteAction() { DiagIDs(CI.getDiagnostics().getDiagnosticIDs()); for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { IntrusiveRefCntPtr - Diags(new DiagnosticsEngine(DiagIDs, CI.getDiagnostics().getClient(), - /*ShouldOwnClient=*/false)); + Diags(new DiagnosticsEngine(DiagIDs, &CI.getDiagnosticOpts(), + CI.getDiagnostics().getClient(), + /*ShouldOwnClient=*/false)); ASTUnit *Unit = ASTUnit::LoadFromASTFile(ASTFiles[I], Diags, CI.getFileSystemOpts(), false); if (!Unit) -- cgit v1.2.3-18-g5258