[PATCH] Don't generate crash report when inline asm can't be parsed

Steven Wu stevenwu at apple.com
Fri Feb 6 15:27:27 PST 2015


Crash report is currently generated when inline asm can't be parsed
and no DiagnosticHandler is registered. However, clang doesn't set up
DiagnosticHandle for inline asm when the input is bitcode and
compiling invalid asm from bitcode shouldn't be a compiler crash.

http://reviews.llvm.org/D7476

Files:
  lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp

Index: lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -159,7 +159,7 @@
                         /*NoFinalize*/ true);
   emitInlineAsmEnd(STIOrig, STI.get());
   if (Res && !HasDiagHandler)
-    report_fatal_error("Error parsing inline asm\n");
+    report_fatal_error("Error parsing inline asm\n", false);
 }
 
 static void EmitMSInlineAsmStr(const char *AsmStr, const MachineInstr *MI,

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7476.19516.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150206/a25411c2/attachment.bin>


More information about the llvm-commits mailing list