aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/GR/SVals.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/GR/SVals.cpp b/lib/GR/SVals.cpp
index 1e583128ff..0484b62f8a 100644
--- a/lib/GR/SVals.cpp
+++ b/lib/GR/SVals.cpp
@@ -292,8 +292,11 @@ void NonLoc::dumpToStream(llvm::raw_ostream& os) const {
switch (getSubKind()) {
case nonloc::ConcreteIntKind: {
const nonloc::ConcreteInt& C = *cast<nonloc::ConcreteInt>(this);
- os << C.getValue().getZExtValue()
- << ' ' << ((C.getValue().isUnsigned()) ? 'U' : 'S')
+ if (C.getValue().isUnsigned())
+ os << C.getValue().getZExtValue();
+ else
+ os << C.getValue().getSExtValue();
+ os << ' ' << (C.getValue().isUnsigned() ? 'U' : 'S')
<< C.getValue().getBitWidth() << 'b';
break;
}