Fix a bunch of inline asm failures
authorChris Lattner <sabre@nondot.org>
Tue, 23 Jan 2007 00:36:17 +0000 (00:36 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 23 Jan 2007 00:36:17 +0000 (00:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33454 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index a9e720149ec7bfd7233019030fd0a5339f1d87e0..d9b97f7005d10c1416287ca4122f5f4ea1bfdc83 100644 (file)
@@ -779,6 +779,7 @@ void AsmPrinter::printInlineAsm(const MachineInstr *MI) const {
       
       const char *IDStart = LastEmitted;
       char *IDEnd;
+      errno = 0;
       long Val = strtol(IDStart, &IDEnd, 10); // We only accept numbers for IDs.
       if (!isdigit(*IDStart) || (Val == 0 && errno == EINVAL)) {
         cerr << "Bad $ operand number in inline asm string: '"