diff options
author | Dale Johannesen <dalej@apple.com> | 2008-10-10 21:04:42 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-10-10 21:04:42 +0000 |
commit | 8b1e0549389e4c360ac95f50da95d5009553b447 (patch) | |
tree | 9f4c42d7f90361c8b3cf596d3e0b34f235bb28cf /lib | |
parent | df75bbae949ab834f3ee4697ea2c13d0ee9f28b2 (diff) | |
download | external_llvm-8b1e0549389e4c360ac95f50da95d5009553b447.zip external_llvm-8b1e0549389e4c360ac95f50da95d5009553b447.tar.gz external_llvm-8b1e0549389e4c360ac95f50da95d5009553b447.tar.bz2 |
Remove some overzealous checks that were rejecting
valid comments in inline assembly.
gcc.target/i386/20011009-1.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 63ada0c..0185441 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1246,21 +1246,17 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const { 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; |