From: Ted Kremenek Date: Tue, 21 Apr 2009 18:31:19 +0000 (+0000) Subject: Add pretty-printing for CodeTextRegions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e051308e7ceac2d5c62f67db9138a62c8aafd021;p=clang Add pretty-printing for CodeTextRegions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/MemRegion.cpp b/lib/Analysis/MemRegion.cpp index 5e71924bf9..ad7e80d724 100644 --- a/lib/Analysis/MemRegion.cpp +++ b/lib/Analysis/MemRegion.cpp @@ -157,6 +157,16 @@ void AllocaRegion::print(llvm::raw_ostream& os) const { os << "alloca{" << (void*) Ex << ',' << Cnt << '}'; } +void CodeTextRegion::print(llvm::raw_ostream& os) const { + os << "code{"; + if (isDeclared()) + os << getDecl()->getDeclName(); + else + os << '$' << getSymbol(); + + os << '}'; +} + void CompoundLiteralRegion::print(llvm::raw_ostream& os) const { // FIXME: More elaborate pretty-printing. os << "{ " << (void*) CL << " }";