diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-24 06:01:33 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-24 06:01:33 +0000 |
commit | a071eb053aeeedc1c8128fd309b3a779b6c3152a (patch) | |
tree | 7a4f35f0e34283be13a4f9b692a3395d5a4b013f /lib/Analysis/RegionStore.cpp | |
parent | 9012bff2ce5afc85936315662d675f2bcede1ca2 (diff) |
Add printing method to RegionStoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index d0798db2c4..417521a14e 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -19,6 +19,7 @@ #include "clang/Analysis/Analyses/LiveVariables.h" #include "llvm/ADT/ImmutableMap.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Compiler.h" using namespace clang; @@ -344,7 +345,14 @@ Store RegionStoreManager::AddDecl(Store store, return store; } -void RegionStoreManager::print(Store store, std::ostream& Out, const char* nl, - const char *sep) { - +void RegionStoreManager::print(Store store, std::ostream& Out, + const char* nl, const char *sep) { + llvm::raw_os_ostream OS(Out); + RegionBindingsTy B = GetRegionBindings(store); + OS << "Store:" << nl; + + for (RegionBindingsTy::iterator I = B.begin(), E = B.end(); I != E; ++I) { + OS << ' '; I.getKey()->print(OS); OS << " : "; + I.getData().print(OS); OS << nl; + } } |