diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-21 18:31:19 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-21 18:31:19 +0000 |
commit | 99de8ae19c1f0881604640cc322940b965ac3359 (patch) | |
tree | 5c1ae27061898c2265d4cc07eec4e58136982c53 | |
parent | 7421c0161a99195d1edf9a54576475e8688fd25f (diff) | |
download | bcm5719-llvm-99de8ae19c1f0881604640cc322940b965ac3359.tar.gz bcm5719-llvm-99de8ae19c1f0881604640cc322940b965ac3359.zip |
Add pretty-printing for CodeTextRegions.
llvm-svn: 69694
-rw-r--r-- | clang/lib/Analysis/MemRegion.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Analysis/MemRegion.cpp b/clang/lib/Analysis/MemRegion.cpp index 5e71924bf9c..ad7e80d7249 100644 --- a/clang/lib/Analysis/MemRegion.cpp +++ b/clang/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 << " }"; |