Always pass "true" to isMaxValue(bool) because we know the type is LongTy.
authorReid Spencer <rspencer@reidspencer.com>
Wed, 6 Dec 2006 21:27:07 +0000 (21:27 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 6 Dec 2006 21:27:07 +0000 (21:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32290 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index 53adc49f8e94ebe10a6274d1e43eee42ff72a0cd..d8fe0e83500477602885e07e7f8f3dff5dd2f069 100644 (file)
@@ -753,7 +753,7 @@ void CWriter::printConstant(Constant *CPV) {
     break;
 
   case Type::LongTyID:
-    if (cast<ConstantInt>(CPV)->isMinValue(CPV->getType()->isSigned()))
+    if (cast<ConstantInt>(CPV)->isMinValue(true))
       Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)";
     else
       Out << cast<ConstantInt>(CPV)->getSExtValue() << "ll";
index 53adc49f8e94ebe10a6274d1e43eee42ff72a0cd..d8fe0e83500477602885e07e7f8f3dff5dd2f069 100644 (file)
@@ -753,7 +753,7 @@ void CWriter::printConstant(Constant *CPV) {
     break;
 
   case Type::LongTyID:
-    if (cast<ConstantInt>(CPV)->isMinValue(CPV->getType()->isSigned()))
+    if (cast<ConstantInt>(CPV)->isMinValue(true))
       Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)";
     else
       Out << cast<ConstantInt>(CPV)->getSExtValue() << "ll";