Fix Regression/TableGen/2006-09-18-LargeInt.td
authorChris Lattner <sabre@nondot.org>
Mon, 18 Sep 2006 22:28:27 +0000 (22:28 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 18 Sep 2006 22:28:27 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30472 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp
utils/TableGen/FileLexer.cpp.cvs
utils/TableGen/FileLexer.l
utils/TableGen/FileLexer.l.cvs

index 4d4fa9dabd011198c4777bf0347d22f41e5e3c69..c9f7897b3f1dc56dc93163015754020cbfdc8421 100644 (file)
@@ -2373,6 +2373,8 @@ public:
           }
         } else if (IntInit *II =
                        dynamic_cast<IntInit*>(Child->getLeafValue())) {
+          if (II->getValue() == 2147483647)
+            std::cerr << "HERE!\n";
           emitCheck("isa<ConstantSDNode>(" + RootName + utostr(OpNo) + ")");
           unsigned CTmp = TmpNo++;
           emitCode("int64_t CN"+utostr(CTmp)+" = cast<ConstantSDNode>("+
index dffd220a44681a61edd92f4b34ff69703bc114ae..b806f065e43c3dcb01faaaa170584e825741991b 100644 (file)
@@ -535,8 +535,8 @@ std::vector<std::string> IncludeDirectories;
 ///
 static int ParseInt(const char *Str) {
   if (Str[0] == '0' && Str[1] == 'b')
-    return strtol(Str+2, 0, 2);
-  return strtol(Str, 0, 0); 
+    return strtoll(Str+2, 0, 2);
+  return strtoll(Str, 0, 0); 
 }
 
 static int CommentDepth = 0;
index 7c9151f00f365b0fc85243a794a2dc92235c0862..c1a7ec06adcd88d3f2ad21fe931ca173477cff37 100644 (file)
@@ -42,8 +42,8 @@ std::vector<std::string> IncludeDirectories;
 ///
 static int ParseInt(const char *Str) {
   if (Str[0] == '0' && Str[1] == 'b')
-    return strtol(Str+2, 0, 2);
-  return strtol(Str, 0, 0); 
+    return strtoll(Str+2, 0, 2);
+  return strtoll(Str, 0, 0); 
 }
 
 static int CommentDepth = 0;
index 7c9151f00f365b0fc85243a794a2dc92235c0862..c1a7ec06adcd88d3f2ad21fe931ca173477cff37 100644 (file)
@@ -42,8 +42,8 @@ std::vector<std::string> IncludeDirectories;
 ///
 static int ParseInt(const char *Str) {
   if (Str[0] == '0' && Str[1] == 'b')
-    return strtol(Str+2, 0, 2);
-  return strtol(Str, 0, 0); 
+    return strtoll(Str+2, 0, 2);
+  return strtoll(Str, 0, 0); 
 }
 
 static int CommentDepth = 0;