From: Ted Kremenek Date: Sun, 19 Jul 2009 20:36:24 +0000 (+0000) Subject: Improve debug pretty-printing for ObjCIVarRegions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bcfe03a0beb61082fa2f40887216d8dbca19a024;p=clang Improve debug pretty-printing for ObjCIVarRegions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(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));