PR5684: Fix refacto, the backend consumer was copying the Diagnostic object,
which meant that hasErrorOccurred() checks to prevent codegen-on-invalid weren't
working.
llvm-svn: 90560
diff --git a/clang/lib/Frontend/Backend.cpp b/clang/lib/Frontend/Backend.cpp
index 0374b0c..5930b33 100644
--- a/clang/lib/Frontend/Backend.cpp
+++ b/clang/lib/Frontend/Backend.cpp
@@ -38,7 +38,7 @@
namespace {
class BackendConsumer : public ASTConsumer {
- Diagnostic Diags;
+ Diagnostic &Diags;
BackendAction Action;
const CodeGenOptions &CodeGenOpts;
const LangOptions &LangOpts;
@@ -66,8 +66,7 @@
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();