aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-05 16:31:07 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-05 16:31:07 +0000
commitbe91224894e1501133e224934285ba6440bf5b59 (patch)
tree1d76e00e4bc503c0baa99753c65d5a628055f90a /lib/Analysis/CFRefCount.cpp
parentfbffca65a95e26b198c084a81a33b9cdfcd01101 (diff)
BasicStore:
- Store bindings using a MemRegion -> SVal binding instead of VarDecl -> SVal binding. This mirrors some of the idea of RegionStore, but is far simpler and not nearly as functional. This leads to some code simplification and some potential for some minor precision hacks. Along the way... - constify the use of MemRegion* in a few places - add operator<<(llvm::raw_ostream, const MemRegion*) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66163 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 6929af32f9..8c3d9bf366 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2663,13 +2663,14 @@ namespace {
class VISIBILITY_HIDDEN FindUniqueBinding :
public StoreManager::BindingsHandler {
SymbolRef Sym;
- MemRegion* Binding;
+ const MemRegion* Binding;
bool First;
public:
FindUniqueBinding(SymbolRef sym) : Sym(sym), Binding(0), First(true) {}
- bool HandleBinding(StoreManager& SMgr, Store store, MemRegion* R, SVal val) {
+ bool HandleBinding(StoreManager& SMgr, Store store, const MemRegion* R,
+ SVal val) {
SymbolRef SymV = val.getAsSymbol();
if (!SymV.isValid() || SymV != Sym)
@@ -2686,7 +2687,7 @@ class VISIBILITY_HIDDEN FindUniqueBinding :
}
operator bool() { return First && Binding; }
- MemRegion* getRegion() { return Binding; }
+ const MemRegion* getRegion() { return Binding; }
};
}