[cfe-commits] r76380 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h lib/Analysis/MemRegion.cpp
Ted Kremenek
kremenek at apple.com
Sun Jul 19 13:36:24 PDT 2009
Author: kremenek
Date: Sun Jul 19 15:36:24 2009
New Revision: 76380
URL: http://llvm.org/viewvc/llvm-project?rev=76380&view=rev
Log:
Improve debug pretty-printing for ObjCIVarRegions.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
cfe/trunk/lib/Analysis/MemRegion.cpp
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h?rev=76380&r1=76379&r2=76380&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h Sun Jul 19 15:36:24 2009
@@ -526,6 +526,8 @@
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;
}
Modified: cfe/trunk/lib/Analysis/MemRegion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/MemRegion.cpp?rev=76380&r1=76379&r2=76380&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/MemRegion.cpp (original)
+++ cfe/trunk/lib/Analysis/MemRegion.cpp Sun Jul 19 15:36:24 2009
@@ -185,6 +185,10 @@
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));
More information about the cfe-commits
mailing list