diff options
author | Steven Wu <stevenwu@apple.com> | 2015-02-12 02:06:55 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2015-02-12 02:06:55 +0000 |
commit | 15b385f8547e6d7236b39e66a8d3a53df5b3f454 (patch) | |
tree | 67e6f7cb7e068ed08fd3698211053596d2988548 /clang/test/CodeGen/asm-errors.c | |
parent | 3c567fce463690d717ca4448c5769524b5a904d8 (diff) | |
download | bcm5719-llvm-15b385f8547e6d7236b39e66a8d3a53df5b3f454.tar.gz bcm5719-llvm-15b385f8547e6d7236b39e66a8d3a53df5b3f454.zip |
Add InlineAsmDiagnosticHandler for bitcode input
Summary:
This patch installs an InlineAsmDiagnosticsHandler to avoid the crash
report when the input is bitcode and the bitcode contains invalid inline
assembly. The handler will simply print the same error message that will
print from the backend.
Add CHECK in test-case
Reviewers: echristo, rafael
Reviewed By: rafael
Subscribers: rafael, cfe-commits
Differential Revision: http://reviews.llvm.org/D7568
llvm-svn: 228898
Diffstat (limited to 'clang/test/CodeGen/asm-errors.c')
-rw-r--r-- | clang/test/CodeGen/asm-errors.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/asm-errors.c b/clang/test/CodeGen/asm-errors.c index 438c82ba74d..05751a8e690 100644 --- a/clang/test/CodeGen/asm-errors.c +++ b/clang/test/CodeGen/asm-errors.c @@ -3,6 +3,12 @@ // RUN: true // UN: not %clang_cc1 -triple i386-apple-darwin10 -emit-obj %s -o /dev/null > %t 2>&1 // UN: 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: FileCheck --check-prefix=CRASH-REPORT %s +// CRASH-REPORT: <inline asm>: +// CRASH-REPORT: error: invalid instruction mnemonic 'abc' +// CRASH-REPORT-NOT: note: diagnostic msg: int test1(int X) { // CHECK: error: invalid instruction mnemonic 'abc' |