Implement dumpToStream() for NonStaticGlobalSpaceRegion and StaticGlobalSpaceRegion.

llvm-svn: 107731
This commit is contained in:
Ted Kremenek 2010-07-06 23:37:21 +00:00
parent 3ed511bc6b
commit 0fc6354f2f
2 changed files with 13 additions and 1 deletions

View File

@ -172,6 +172,8 @@ class StaticGlobalSpaceRegion : public GlobalsSpaceRegion {
public:
void Profile(llvm::FoldingSetNodeID &ID) const;
void dumpToStream(llvm::raw_ostream& os) const;
const CodeTextRegion *getCodeRegion() const { return CR; }
static bool classof(const MemRegion *R) {
@ -186,6 +188,9 @@ class NonStaticGlobalSpaceRegion : public GlobalsSpaceRegion {
: GlobalsSpaceRegion(mgr, NonStaticGlobalSpaceRegionKind) {}
public:
void dumpToStream(llvm::raw_ostream& os) const;
static bool classof(const MemRegion *R) {
return R->getKind() == NonStaticGlobalSpaceRegionKind;
}

View File

@ -402,7 +402,6 @@ void BlockDataRegion::dumpToStream(llvm::raw_ostream& os) const {
os << "block_data{" << BC << '}';
}
void CompoundLiteralRegion::dumpToStream(llvm::raw_ostream& os) const {
// FIXME: More elaborate pretty-printing.
os << "{ " << (void*) CL << " }";
@ -421,6 +420,10 @@ void FieldRegion::dumpToStream(llvm::raw_ostream& os) const {
os << superRegion << "->" << getDecl();
}
void NonStaticGlobalSpaceRegion::dumpToStream(llvm::raw_ostream &os) const {
os << "NonStaticGlobalSpaceRegion";
}
void ObjCIvarRegion::dumpToStream(llvm::raw_ostream& os) const {
os << "ivar{" << superRegion << ',' << getDecl() << '}';
}
@ -445,6 +448,10 @@ void RegionRawOffset::dumpToStream(llvm::raw_ostream& os) const {
os << "raw_offset{" << getRegion() << ',' << getByteOffset() << '}';
}
void StaticGlobalSpaceRegion::dumpToStream(llvm::raw_ostream &os) const {
os << "StaticGlobalsMemSpace{" << CR << '}';
}
//===----------------------------------------------------------------------===//
// MemRegionManager methods.
//===----------------------------------------------------------------------===//