aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r--lib/Frontend/FrontendAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp
index 464b589f18..87fc1227b2 100644
--- a/lib/Frontend/FrontendAction.cpp
+++ b/lib/Frontend/FrontendAction.cpp
@@ -45,9 +45,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
"Attempt to pass AST file to preprocessor only action!");
assert(hasASTSupport() && "This action does not have AST support!");
+ llvm::IntrusiveRefCntPtr<Diagnostic> Diags(&CI.getDiagnostics());
std::string Error;
- ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename,
- UnownedDiag(CI.getDiagnostics()));
+ ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename, Diags);
if (!AST)
goto failure;