[llvm-commits] [llvm] r57365 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Dale Johannesen
dalej at apple.com
Fri Oct 10 14:04:42 PDT 2008
Author: johannes
Date: Fri Oct 10 16:04:42 2008
New Revision: 57365
URL: http://llvm.org/viewvc/llvm-project?rev=57365&view=rev
Log:
Remove some overzealous checks that were rejecting
valid comments in inline assembly.
gcc.target/i386/20011009-1.c
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=57365&r1=57364&r2=57365&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Oct 10 16:04:42 2008
@@ -1246,21 +1246,17 @@
break;
case '|':
++LastEmitted; // consume '|' character.
- if (CurVariant == -1) {
- cerr << "Found '|' character outside of variant in inline asm "
- << "string: '" << AsmStr << "'\n";
- exit(1);
- }
- ++CurVariant; // We're in the next variant.
+ if (CurVariant == -1)
+ O << '|'; // this is gcc's behavior for | outside a variant
+ else
+ ++CurVariant; // We're in the next variant.
break;
case ')': // $) -> same as GCC's } char.
++LastEmitted; // consume ')' character.
- if (CurVariant == -1) {
- cerr << "Found '}' character outside of variant in inline asm "
- << "string: '" << AsmStr << "'\n";
- exit(1);
- }
- CurVariant = -1;
+ if (CurVariant == -1)
+ O << '}'; // this is gcc's behavior for } outside a variant
+ else
+ CurVariant = -1;
break;
}
if (Done) break;
More information about the llvm-commits
mailing list