diff options
author | Tim Northover <tnorthover@apple.com> | 2016-03-31 19:19:24 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-03-31 19:19:24 +0000 |
commit | 8c824a07ae9196846fbc34cbb4be2f6cfa48516a (patch) | |
tree | 6c9856d7d722d9b485bf6a358b0bc873792b88aa /clang | |
parent | 3da993c4192c64334bf667d53b74378b369973b3 (diff) | |
download | bcm5719-llvm-8c824a07ae9196846fbc34cbb4be2f6cfa48516a.tar.gz bcm5719-llvm-8c824a07ae9196846fbc34cbb4be2f6cfa48516a.zip |
Diagnostics: remove dodgy handler for bitcode inlineasm diagnostics.
Whatever crash it was there to present appears to have been fixed in the
backend now, and it had the nasty side-effect of causing clang to exit(0) and
leave a .o containing goodness knows what even when an error hit.
llvm-svn: 265038
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 8 | ||||
-rw-r--r-- | clang/test/CodeGen/asm-errors.c | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index edd258d3d5e..658c2b8c773 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -756,12 +756,6 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { return std::move(Result); } -static void BitcodeInlineAsmDiagHandler(const llvm::SMDiagnostic &SM, - void *Context, - unsigned LocCookie) { - SM.print(nullptr, llvm::errs()); -} - void CodeGenAction::ExecuteAction() { // If this is an IR file, we have to treat it specially. if (getCurrentFileKind() == IK_LLVM_IR) { @@ -810,8 +804,6 @@ void CodeGenAction::ExecuteAction() { TheModule->setTargetTriple(TargetOpts.Triple); } - LLVMContext &Ctx = TheModule->getContext(); - Ctx.setInlineAsmDiagnosticHandler(BitcodeInlineAsmDiagHandler); EmitBackendOutput(CI.getDiagnostics(), CI.getCodeGenOpts(), TargetOpts, CI.getLangOpts(), CI.getTarget().getDataLayout(), TheModule.get(), BA, OS); diff --git a/clang/test/CodeGen/asm-errors.c b/clang/test/CodeGen/asm-errors.c index 7042f313d7a..7edce64f203 100644 --- a/clang/test/CodeGen/asm-errors.c +++ b/clang/test/CodeGen/asm-errors.c @@ -3,7 +3,7 @@ // RUN: not %clang_cc1 -triple i386-apple-darwin10 -emit-obj %s -o /dev/null > %t 2>&1 // RUN: FileCheck %s < %t // RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-llvm-bc %s -o %t.bc -// RUN: %clang_cc1 -triple i386-apple-darwin10 -emit-obj %t.bc -o /dev/null 2>&1 | \ +// RUN: not %clang_cc1 -triple i386-apple-darwin10 -emit-obj %t.bc -o /dev/null 2>&1 | \ // RUN: FileCheck --check-prefix=CRASH-REPORT %s // CRASH-REPORT: <inline asm>: // CRASH-REPORT: error: invalid instruction mnemonic 'abc' |