diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-19 20:36:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-19 20:36:24 +0000 |
commit | bcfe03a0beb61082fa2f40887216d8dbca19a024 (patch) | |
tree | 08c68c16dee57dbf674bfa1a7542dc99c7d398a8 | |
parent | be6d259a375bbec49659d54a302c4758058f2eef (diff) |
Improve debug pretty-printing for ObjCIVarRegions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/PathSensitive/MemRegion.h | 2 | ||||
-rw-r--r-- | lib/Analysis/MemRegion.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Analysis/PathSensitive/MemRegion.h b/include/clang/Analysis/PathSensitive/MemRegion.h index 7f8c5c2903..bcd195e75e 100644 --- a/include/clang/Analysis/PathSensitive/MemRegion.h +++ b/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/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp index 9b3c36d022..906c1554d4 100644 --- a/lib/Analysis/MemRegion.cpp +++ b/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)); |