Adjust to new ConstantIntegral interface for Max/Min tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32289 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 6d83aeb..53adc49 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -753,7 +753,7 @@
break;
case Type::LongTyID:
- if (cast<ConstantInt>(CPV)->isMinValue())
+ if (cast<ConstantInt>(CPV)->isMinValue(CPV->getType()->isSigned()))
Out << "(/*INT64_MIN*/(-9223372036854775807LL)-1)";
else
Out << cast<ConstantInt>(CPV)->getSExtValue() << "ll";