]> granicus.if.org Git - clang/commitdiff
Improve debug pretty-printing for ObjCIVarRegions.
authorTed Kremenek <kremenek@apple.com>
Sun, 19 Jul 2009 20:36:24 +0000 (20:36 +0000)
committerTed Kremenek <kremenek@apple.com>
Sun, 19 Jul 2009 20:36:24 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76380 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/MemRegion.h
lib/Analysis/MemRegion.cpp

index 7f8c5c29037f06ec406206e0df4b01e4f4292dc9..bcd195e75e88f082086d1b3cd3d3bb4f1eb905d1 100644 (file)
@@ -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;
   }
index 9b3c36d022183ecb365fc0084e8840e033d84a4e..906c1554d4f4e5e30f07fd5385b33158db8ef0a7 100644 (file)
@@ -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));