forked from OSchip/llvm-project
Refactor dump methods to make RegionBindingsRef printable in the debugger.
llvm-svn: 170170
This commit is contained in:
parent
06119a17ce
commit
45bb8db372
|
@ -201,6 +201,21 @@ public:
|
|||
Store asStore() const {
|
||||
return asImmutableMap().getRootWithoutRetain();
|
||||
}
|
||||
|
||||
void dump(llvm::raw_ostream &OS, const char *nl) const {
|
||||
for (iterator I = begin(), E = end(); I != E; ++I) {
|
||||
const ClusterBindings &Cluster = I.getData();
|
||||
for (ClusterBindings::iterator CI = Cluster.begin(), CE = Cluster.end();
|
||||
CI != CE; ++CI) {
|
||||
OS << ' ' << CI.getKey() << " : " << CI.getData() << nl;
|
||||
}
|
||||
OS << nl;
|
||||
}
|
||||
}
|
||||
|
||||
LLVM_ATTRIBUTE_USED void dump() const {
|
||||
dump(llvm::errs(), "\n");
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
|
@ -2037,13 +2052,5 @@ void RegionStoreManager::print(Store store, raw_ostream &OS,
|
|||
OS << "Store (direct and default bindings), "
|
||||
<< B.asStore()
|
||||
<< " :" << nl;
|
||||
|
||||
for (RegionBindingsRef::iterator I = B.begin(), E = B.end(); I != E; ++I) {
|
||||
const ClusterBindings &Cluster = I.getData();
|
||||
for (ClusterBindings::iterator CI = Cluster.begin(), CE = Cluster.end();
|
||||
CI != CE; ++CI) {
|
||||
OS << ' ' << CI.getKey() << " : " << CI.getData() << nl;
|
||||
}
|
||||
OS << nl;
|
||||
}
|
||||
B.dump(OS, nl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue