[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp
Reid Spencer
reid at x10sys.com
Tue Feb 27 12:48:36 PST 2007
Changes in directory llvm-test/SingleSource/UnitTests/Integer/APInt:
gptest.cpp updated: 1.6 -> 1.7
---
Log message:
Adjust to changes in the APInt interface.
---
Diffs of the changes: (+7 -3)
gptest.cpp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
Index: llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp
diff -u llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp:1.6 llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp:1.7
--- llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp:1.6 Tue Feb 27 11:58:33 2007
+++ llvm-test/SingleSource/UnitTests/Integer/APInt/gptest.cpp Tue Feb 27 14:48:20 2007
@@ -23,7 +23,11 @@
static int input = 0, output = 0;
void print(const APInt& X, bool wantSigned = false, bool withNL = true) {
- std::string decstr = X.toString(10,wantSigned);
+ std::string decstr;
+ if (wantSigned)
+ decstr = X.toStringSigned(10);
+ else
+ decstr = X.toString(10);
printf("%s", decstr.c_str());
if (withNL)
printf("\n");
@@ -367,8 +371,8 @@
APInt one(bits,1);
APInt two(bits,2);
APInt three(bits,3);
- APInt min = APInt::getMinValue(bits, true);
- APInt max = APInt::getMaxValue(bits, true);
+ APInt min = APInt::getSignedMinValue(bits);
+ APInt max = APInt::getSignedMaxValue(bits);
APInt mid = APIntOps::lshr(max, bits/2);
APInt r1 = randomAPInt(bits);
APInt r2 = randomAPInt(bits);
More information about the llvm-commits
mailing list