diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-17 04:40:39 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-17 04:40:39 +0000 |
commit | 10549c29a871783a01db8db3cc3ae2a8bb8289e2 (patch) | |
tree | fa527f6d35f4ccca0e27541c8f65a3d89e9f2d71 | |
parent | 3c683f5bf2888f61e5c5f355bc593bae2d9244b0 (diff) | |
download | bcm5719-llvm-10549c29a871783a01db8db3cc3ae2a8bb8289e2.tar.gz bcm5719-llvm-10549c29a871783a01db8db3cc3ae2a8bb8289e2.zip |
Use INT64_C to emit constant values, to avoid problems with
constants that don't fit in an int. This fixes
"this decimal constant is unsigned only in ISO C90"
warnings.
llvm-svn: 57668
-rw-r--r-- | llvm/utils/TableGen/DAGISelEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index 78239ec3348..299612977a1 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/utils/TableGen/DAGISelEmitter.cpp @@ -444,7 +444,8 @@ public: if (N->isLeaf()) { if (IntInit *II = dynamic_cast<IntInit*>(N->getLeafValue())) { emitCheck("cast<ConstantSDNode>(" + RootName + - ")->getSExtValue() == " + itostr(II->getValue())); + ")->getSExtValue() == INT64_C(" + + itostr(II->getValue()) + ")"); return; } else if (!NodeIsComplexPattern(N)) { assert(0 && "Cannot match this as a leaf value!"); @@ -578,7 +579,7 @@ public: const char *MaskPredicate = N->getOperator()->getName() == "or" ? "CheckOrMask(" : "CheckAndMask("; emitCheck(MaskPredicate + RootName + "0, cast<ConstantSDNode>(" + - RootName + "1), " + itostr(II->getValue()) + ")"); + RootName + "1), INT64_C(" + itostr(II->getValue()) + "))"); EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), RootName, ChainSuffix + utostr(0), FoundChain); |