summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-10-24 06:01:33 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-10-24 06:01:33 +0000
commit1359e00f9c4513d62eec39359fed0f40063ab6fd (patch)
treebe33261c7875aaa034ca570839bd00416c5bc3cf /clang/lib/Analysis/RegionStore.cpp
parent509bd9e30a09646489e36fe73afbdcc2d1795fad (diff)
downloadbcm5719-llvm-1359e00f9c4513d62eec39359fed0f40063ab6fd.tar.gz
bcm5719-llvm-1359e00f9c4513d62eec39359fed0f40063ab6fd.zip
Add printing method to RegionStoreManager.
llvm-svn: 58074
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index d0798db2c49..417521a14ec 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/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;
+ }
}
OpenPOWER on IntegriCloud