aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-08-15 12:45:09 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-08-15 12:45:09 +0000
commit5e4cb347cbf12c292b80386c872e5eaef21b5c23 (patch)
tree4655b61acef9e261b15a6ef4e57f68fe49a9dd66 /lib/Checker/RegionStore.cpp
parentc83d2d7d8914a0fe00d679a262f2bdae7689f16d (diff)
StoreManager::RemoveDeadBindings() can take a Store instead of an entire GRState now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r--lib/Checker/RegionStore.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp
index e5c75b9371..b6ea696c4e 100644
--- a/lib/Checker/RegionStore.cpp
+++ b/lib/Checker/RegionStore.cpp
@@ -347,9 +347,8 @@ public: // Part of public interface to class.
/// RemoveDeadBindings - Scans the RegionStore of 'state' for dead values.
/// It returns a new Store with these values removed.
- const GRState *RemoveDeadBindings(GRState &state,
- const StackFrameContext *LCtx,
- SymbolReaper& SymReaper,
+ Store RemoveDeadBindings(Store store, const StackFrameContext *LCtx,
+ SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots);
Store EnterStackFrame(const GRState *state, const StackFrameContext *frame);
@@ -1792,12 +1791,12 @@ bool RemoveDeadBindingsWorker::UpdatePostponed() {
return changed;
}
-const GRState *RegionStoreManager::RemoveDeadBindings(GRState &state,
+Store RegionStoreManager::RemoveDeadBindings(Store store,
const StackFrameContext *LCtx,
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots)
{
- RegionBindings B = GetRegionBindings(state.getStore());
+ RegionBindings B = GetRegionBindings(store);
RemoveDeadBindingsWorker W(*this, StateMgr, B, SymReaper, LCtx);
W.GenerateClusters();
@@ -1830,9 +1829,8 @@ const GRState *RegionStoreManager::RemoveDeadBindings(GRState &state,
for (; SI != SE; ++SI)
SymReaper.maybeDead(*SI);
}
- state.setStore(B.getRoot());
- const GRState *s = StateMgr.getPersistentState(state);
- return s;
+
+ return B.getRoot();
}