summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/BasicStore.cpp
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-27 10:45:02 +0000
committered <ed@FreeBSD.org>2009-06-27 10:45:02 +0000
commitc1ff020ff2d3e7ba86f7ab986ac7569c34f2ab1a (patch)
tree2c5a83521a20c02e7805581a174008aa9bc23579 /lib/Analysis/BasicStore.cpp
parent14660dbe9881f68a6cc2b9f014e1fb7b7228bca4 (diff)
downloadFreeBSD-src-c1ff020ff2d3e7ba86f7ab986ac7569c34f2ab1a.zip
FreeBSD-src-c1ff020ff2d3e7ba86f7ab986ac7569c34f2ab1a.tar.gz
Import Clang r74383.
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r--lib/Analysis/BasicStore.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 6b346cd..8fbce52 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -112,7 +112,8 @@ public:
return BindingsTy(static_cast<const BindingsTy::TreeTy*>(store));
}
- void print(Store store, std::ostream& Out, const char* nl, const char *sep);
+ void print(Store store, llvm::raw_ostream& Out, const char* nl,
+ const char *sep);
private:
ASTContext& getContext() { return StateMgr.getContext(); }
@@ -535,7 +536,7 @@ Store BasicStoreManager::getInitialStore() {
// Initialize globals and parameters to symbolic values.
// Initialize local variables to undefined.
- const MemRegion *R = StateMgr.getRegion(VD);
+ const MemRegion *R = ValMgr.getRegionManager().getVarRegion(VD);
SVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) ||
isa<ImplicitParamDecl>(VD))
? ValMgr.getRegionValueSymbolVal(R)
@@ -602,18 +603,19 @@ Store BasicStoreManager::BindDeclInternal(Store store, const VarDecl* VD,
return store;
}
-void BasicStoreManager::print(Store store, std::ostream& O,
+void BasicStoreManager::print(Store store, llvm::raw_ostream& Out,
const char* nl, const char *sep) {
- llvm::raw_os_ostream Out(O);
BindingsTy B = GetBindings(store);
Out << "Variables:" << nl;
bool isFirst = true;
for (BindingsTy::iterator I=B.begin(), E=B.end(); I != E; ++I) {
- if (isFirst) isFirst = false;
- else Out << nl;
+ if (isFirst)
+ isFirst = false;
+ else
+ Out << nl;
Out << ' ' << I.getKey() << " : ";
I.getData().print(Out);
OpenPOWER on IntegriCloud