From 4ebdf5c4f587daef4e0be499802eac3a7a49bf2f Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 27 Jun 2009 10:45:02 +0000 Subject: Import Clang r74383. --- lib/Analysis/BasicStore.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/Analysis/BasicStore.cpp') diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp index 6b346cd52557..8fbce528fa9a 100644 --- a/lib/Analysis/BasicStore.cpp +++ b/lib/Analysis/BasicStore.cpp @@ -112,7 +112,8 @@ public: return BindingsTy(static_cast(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(VD) || isa(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); -- cgit v1.3