Add printing method to RegionStoreManager.

llvm-svn: 58074
This commit is contained in:
Zhongxing Xu 2008-10-24 06:01:33 +00:00
parent 509bd9e30a
commit 1359e00f9c
1 changed files with 11 additions and 3 deletions

View File

@ -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;
}
}