summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-19 20:36:24 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-19 20:36:24 +0000
commit291e8f770eba5390afe8f068be29f509f6eabc2a (patch)
tree3d96f1c2d70b4de186691dfa5d32ec08d27eaceb
parent14d021f5381e51b50514b7e52f14389d3f96f373 (diff)
downloadbcm5719-llvm-291e8f770eba5390afe8f068be29f509f6eabc2a.tar.gz
bcm5719-llvm-291e8f770eba5390afe8f068be29f509f6eabc2a.zip
Improve debug pretty-printing for ObjCIVarRegions.
llvm-svn: 76380
-rw-r--r--clang/include/clang/Analysis/PathSensitive/MemRegion.h2
-rw-r--r--clang/lib/Analysis/MemRegion.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/MemRegion.h b/clang/include/clang/Analysis/PathSensitive/MemRegion.h
index 7f8c5c29037..bcd195e75e8 100644
--- a/clang/include/clang/Analysis/PathSensitive/MemRegion.h
+++ b/clang/include/clang/Analysis/PathSensitive/MemRegion.h
@@ -526,6 +526,8 @@ public:
const ObjCIvarDecl* getDecl() const { return cast<ObjCIvarDecl>(D); }
QualType getValueType(ASTContext&) const { return getDecl()->getType(); }
+ void dumpToStream(llvm::raw_ostream& os) const;
+
static bool classof(const MemRegion* R) {
return R->getKind() == ObjCIvarRegionKind;
}
diff --git a/clang/lib/Analysis/MemRegion.cpp b/clang/lib/Analysis/MemRegion.cpp
index 9b3c36d0221..906c1554d4f 100644
--- a/clang/lib/Analysis/MemRegion.cpp
+++ b/clang/lib/Analysis/MemRegion.cpp
@@ -185,6 +185,10 @@ void FieldRegion::dumpToStream(llvm::raw_ostream& os) const {
os << superRegion << "->" << getDecl()->getNameAsString();
}
+void ObjCIvarRegion::dumpToStream(llvm::raw_ostream& os) const {
+ os << "ivar{" << superRegion << ',' << getDecl()->getNameAsString() << '}';
+}
+
void StringRegion::dumpToStream(llvm::raw_ostream& os) const {
LangOptions LO; // FIXME.
Str->printPretty(os, 0, PrintingPolicy(LO));
OpenPOWER on IntegriCloud