diff options
-rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 14 |
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; + } } |