Add pretty printing to StringRegion.

llvm-svn: 58985
This commit is contained in:
Zhongxing Xu 2008-11-10 13:05:26 +00:00
parent 0a758fae91
commit bba5c7c629
2 changed files with 6 additions and 0 deletions

View File

@ -194,6 +194,8 @@ public:
ProfileRegion(ID, Str, superRegion);
}
void print(llvm::raw_ostream& os) const;
static bool classof(const MemRegion* R) {
return R->getKind() == StringRegionKind;
}

View File

@ -151,6 +151,10 @@ void CompoundLiteralRegion::print(llvm::raw_ostream& os) const {
os << "{ " << (void*) CL << " }";
}
void StringRegion::print(llvm::raw_ostream& os) const {
os << "\"" << Str->getStrData() << "\"";
}
//===----------------------------------------------------------------------===//
// MemRegionManager methods.
//===----------------------------------------------------------------------===//