diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-10-26 00:06:15 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-10-26 00:06:15 +0000 |
| commit | f59449e7905cbf98dea5c48d3e97aeee098a2c46 (patch) | |
| tree | 4ccb7d707e3a884fc7a183ac9ed9967029ce82ed /clang/lib/Checker/RegionStore.cpp | |
| parent | 731310e13e8c29eed4cfcd5bc24bd6b2992e536f (diff) | |
| download | bcm5719-llvm-f59449e7905cbf98dea5c48d3e97aeee098a2c46.tar.gz bcm5719-llvm-f59449e7905cbf98dea5c48d3e97aeee098a2c46.zip | |
Move 'includeGlobals' as a field into ClusterAnalysis.
llvm-svn: 117335
Diffstat (limited to 'clang/lib/Checker/RegionStore.cpp')
| -rw-r--r-- | clang/lib/Checker/RegionStore.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp index 91f7cfaf6c8..95d082ee447 100644 --- a/clang/lib/Checker/RegionStore.cpp +++ b/clang/lib/Checker/RegionStore.cpp @@ -456,12 +456,14 @@ protected: ValueManager &ValMgr; RegionBindings B; + + const bool includeGlobals; public: ClusterAnalysis(RegionStoreManager &rm, GRStateManager &StateMgr, - RegionBindings b) + RegionBindings b, const bool includeGlobals) : RM(rm), Ctx(StateMgr.getContext()), ValMgr(StateMgr.getValueManager()), - B(b) {} + B(b), includeGlobals(includeGlobals) {} RegionBindings getRegionBindings() const { return B; } @@ -487,7 +489,7 @@ public: return *CRef; } - void GenerateClusters(bool includeGlobals = false) { + void GenerateClusters() { // Scan the entire set of bindings and make the region clusters. for (RegionBindings::iterator RI = B.begin(), RE = B.end(); RI != RE; ++RI){ RegionCluster &C = AddToCluster(RI.getKey()); @@ -574,8 +576,9 @@ public: RegionBindings b, const Expr *ex, unsigned count, StoreManager::InvalidatedSymbols *is, - StoreManager::InvalidatedRegions *r) - : ClusterAnalysis<InvalidateRegionsWorker>(rm, stateMgr, b), + StoreManager::InvalidatedRegions *r, + bool includeGlobals) + : ClusterAnalysis<InvalidateRegionsWorker>(rm, stateMgr, b, includeGlobals), Ex(ex), Count(count), IS(is), Regions(r) {} void VisitCluster(const MemRegion *baseR, BindingKey *I, BindingKey *E); @@ -698,10 +701,10 @@ Store RegionStoreManager::InvalidateRegions(Store store, InvalidatedRegions *Regions) { InvalidateRegionsWorker W(*this, StateMgr, RegionStoreManager::GetRegionBindings(store), - Ex, Count, IS, Regions); + Ex, Count, IS, Regions, invalidateGlobals); // Scan the bindings and generate the clusters. - W.GenerateClusters(invalidateGlobals); + W.GenerateClusters(); // Add I .. E to the worklist. for ( ; I != E; ++I) @@ -1612,7 +1615,8 @@ public: RemoveDeadBindingsWorker(RegionStoreManager &rm, GRStateManager &stateMgr, RegionBindings b, SymbolReaper &symReaper, const StackFrameContext *LCtx) - : ClusterAnalysis<RemoveDeadBindingsWorker>(rm, stateMgr, b), + : ClusterAnalysis<RemoveDeadBindingsWorker>(rm, stateMgr, b, + /* includeGlobals = */ false), SymReaper(symReaper), CurrentLCtx(LCtx) {} // Called by ClusterAnalysis. |

