Add InlineAsmDiagnosticHandler for bitcode input
authorSteven Wu <stevenwu@apple.com>
Thu, 12 Feb 2015 02:06:55 +0000 (02:06 +0000)
committerSteven Wu <stevenwu@apple.com>
Thu, 12 Feb 2015 02:06:55 +0000 (02:06 +0000)
commit15b385f8547e6d7236b39e66a8d3a53df5b3f454
tree67e6f7cb7e068ed08fd3698211053596d2988548
parent3c567fce463690d717ca4448c5769524b5a904d8
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
clang/lib/CodeGen/CodeGenAction.cpp
clang/test/CodeGen/asm-errors.c