diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-05 23:52:57 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-05 23:52:57 +0000 |
commit | 28019772db70d4547be05a042eb950bc910f134f (patch) | |
tree | 45835536240a6d2138eeabd8036ad956ce091b95 /lib/Frontend/FrontendAction.cpp | |
parent | e9686572f17968048a5e097254f85c202ea44aec (diff) |
Make Diagnostic reference-counted, which is simpler than juggling
maybe-ownership vs. ownership.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 4 |
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; |