diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
commit | 60bfabcd8ce617297c0d231f77d14ab507e98796 (patch) | |
tree | 59c928209f8007777dd96568b026bdfe200691de /lib/Frontend/FrontendAction.cpp | |
parent | 2c56c396ce5990954f85194029eeb391bc3529ff (diff) |
Notes
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 110612d03b58..87fc1227b2f2 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -45,8 +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, CI.getDiagnostics()); + ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename, Diags); if (!AST) goto failure; @@ -135,7 +136,7 @@ void FrontendAction::Execute() { // simplest way to reuse the logic in ParseAST. const char *EmptyStr = ""; llvm::MemoryBuffer *SB = - llvm::MemoryBuffer::getMemBuffer(EmptyStr, EmptyStr, "<dummy input>"); + llvm::MemoryBuffer::getMemBuffer(EmptyStr, "<dummy input>"); CI.getSourceManager().createMainFileIDForMemBuffer(SB); } else { if (!CI.InitializeSourceManager(getCurrentFile())) |