Enhance pretty-printing for nonloc::ConcreteInt

to also include signedness and bitwidth of
the underlying integer.

llvm-svn: 122466
This commit is contained in:
Ted Kremenek 2010-12-23 02:42:31 +00:00
parent a2cf2637da
commit 08cbe57d00
1 changed files with 6 additions and 4 deletions

View File

@ -290,11 +290,13 @@ void SVal::dumpToStream(llvm::raw_ostream& os) const {
void NonLoc::dumpToStream(llvm::raw_ostream& os) const {
switch (getSubKind()) {
case nonloc::ConcreteIntKind:
os << cast<nonloc::ConcreteInt>(this)->getValue().getZExtValue();
if (cast<nonloc::ConcreteInt>(this)->getValue().isUnsigned())
os << 'U';
case nonloc::ConcreteIntKind: {
const nonloc::ConcreteInt& C = *cast<nonloc::ConcreteInt>(this);
os << C.getValue().getZExtValue()
<< ' ' << ((C.getValue().isUnsigned()) ? 'U' : 'S')
<< C.getValue().getBitWidth() << 'b';
break;
}
case nonloc::SymbolValKind:
os << '$' << cast<nonloc::SymbolVal>(this)->getSymbol();
break;