aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/RegionStore.cpp
diff options
context:
space:
mode:
authorJordy Rose <jediknil@belkadan.com>2010-08-03 20:44:35 +0000
committerJordy Rose <jediknil@belkadan.com>2010-08-03 20:44:35 +0000
commitff59efd65bb1f2f8d005079597f814a3c8381f95 (patch)
tree59c765af616e3fe64c00f40c2687084dc7c1609c /lib/Checker/RegionStore.cpp
parenteb8837b88c18631c69ac75f64ab1853762063180 (diff)
Makes GRState::makeWithStore private, to encourage clients to make store changes through GRState instead of directly accessing the StoreManager. Also adds cover methods for InvalidateRegion(s) and EnterStackFrame to GRState.
This is in preparation for proposed region change notifications. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r--lib/Checker/RegionStore.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp
index f7e19f6f51..733254311f 100644
--- a/lib/Checker/RegionStore.cpp
+++ b/lib/Checker/RegionStore.cpp
@@ -357,8 +357,7 @@ public: // Part of public interface to class.
SymbolReaper& SymReaper,
llvm::SmallVectorImpl<const MemRegion*>& RegionRoots);
- const GRState *EnterStackFrame(const GRState *state,
- const StackFrameContext *frame);
+ Store EnterStackFrame(const GRState *state, const StackFrameContext *frame);
//===------------------------------------------------------------------===//
// Region "extents".
@@ -1841,8 +1840,8 @@ const GRState *RegionStoreManager::RemoveDeadBindings(GRState &state,
}
-GRState const *RegionStoreManager::EnterStackFrame(GRState const *state,
- StackFrameContext const *frame) {
+Store RegionStoreManager::EnterStackFrame(const GRState *state,
+ const StackFrameContext *frame) {
FunctionDecl const *FD = cast<FunctionDecl>(frame->getDecl());
FunctionDecl::param_const_iterator PI = FD->param_begin();
Store store = state->getStore();
@@ -1866,9 +1865,9 @@ GRState const *RegionStoreManager::EnterStackFrame(GRState const *state,
store = Bind(store, ValMgr.makeLoc(MRMgr.getVarRegion(*PI,frame)),ArgVal);
}
} else
- assert(0 && "Unhandled call expression.");
+ llvm_unreachable("Unhandled call expression.");
- return state->makeWithStore(store);
+ return store;
}
//===----------------------------------------------------------------------===//