From: Daniel Dunbar Date: Fri, 4 Dec 2009 08:17:40 +0000 (+0000) Subject: PR5684: Fix refacto, the backend consumer was copying the Diagnostic object, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=125bbbe648cca39a415a8052cd36b6bd1936d679;p=clang PR5684: Fix refacto, the backend consumer was copying the Diagnostic object, which meant that hasErrorOccurred() checks to prevent codegen-on-invalid weren't working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90560 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/Backend.cpp b/lib/Frontend/Backend.cpp index 0374b0caa2..5930b33028 100644 --- a/lib/Frontend/Backend.cpp +++ b/lib/Frontend/Backend.cpp @@ -38,7 +38,7 @@ using namespace llvm; namespace { class BackendConsumer : public ASTConsumer { - Diagnostic Diags; + Diagnostic &Diags; BackendAction Action; const CodeGenOptions &CodeGenOpts; const LangOptions &LangOpts; @@ -66,8 +66,7 @@ namespace { void CreatePasses(); - /// AddEmitPasses - Add passes necessary to emit assembly or LLVM - /// IR. + /// AddEmitPasses - Add passes necessary to emit assembly or LLVM IR. /// /// \return True on success. bool AddEmitPasses();