Fix a bunch of inline asm failures
llvm-svn: 33454
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index a9e7201..d9b97f7 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -779,6 +779,7 @@
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: '"