summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-05 23:52:57 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-05 23:52:57 +0000
commit7f95d26e53052b368642b43dbef7ebb1911b5024 (patch)
treea1e04b03ab674a997d3788420d75ce5eb4b4b89c /clang/lib/Frontend/FrontendAction.cpp
parent1a9b3f348484b6792c51fd9995a90fbd99ade773 (diff)
downloadbcm5719-llvm-7f95d26e53052b368642b43dbef7ebb1911b5024.tar.gz
bcm5719-llvm-7f95d26e53052b368642b43dbef7ebb1911b5024.zip
Make Diagnostic reference-counted, which is simpler than juggling
maybe-ownership vs. ownership. llvm-svn: 100498
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 464b589f183..87fc1227b2f 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud