From c91ca30b4ce749ab3580bca9b10f463737932c46 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 6 Aug 2011 00:29:57 +0000 Subject: [analyzer] Change SymbolReaper to store region roots implied by the Environment, allowing it be queried when determining if symbols derived from regions are still live. llvm-svn: 137005 --- clang/lib/StaticAnalyzer/Core/RegionStore.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/RegionStore.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp index 852af29d812..6a039c55f57 100644 --- a/clang/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/clang/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -373,10 +373,10 @@ 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. StoreRef removeDeadBindings(Store store, const StackFrameContext *LCtx, - SymbolReaper& SymReaper, - SmallVectorImpl& RegionRoots); + SymbolReaper& SymReaper); - StoreRef enterStackFrame(const GRState *state, const StackFrameContext *frame); + StoreRef enterStackFrame(const GRState *state, + const StackFrameContext *frame); //===------------------------------------------------------------------===// // Region "extents". @@ -1774,17 +1774,16 @@ bool removeDeadBindingsWorker::UpdatePostponed() { StoreRef RegionStoreManager::removeDeadBindings(Store store, const StackFrameContext *LCtx, - SymbolReaper& SymReaper, - SmallVectorImpl& RegionRoots) -{ + SymbolReaper& SymReaper) { RegionBindings B = GetRegionBindings(store); removeDeadBindingsWorker W(*this, StateMgr, B, SymReaper, LCtx); W.GenerateClusters(); // Enqueue the region roots onto the worklist. - for (SmallVectorImpl::iterator I=RegionRoots.begin(), - E=RegionRoots.end(); I!=E; ++I) + for (SymbolReaper::region_iterator I = SymReaper.region_begin(), + E = SymReaper.region_end(); I != E; ++I) { W.AddToWorkList(*I); + } do W.RunWorkList(); while (W.UpdatePostponed()); -- cgit v1.2.3