aboutsummaryrefslogtreecommitdiff
path: root/lib/Checker/GRState.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-02-08 09:30:02 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-02-08 09:30:02 +0000
commit6f8c430a95279ef048a356d6283871477b4ad351 (patch)
treec5af9162586f17610d741fc0a5fcdc4ab404e2dc /lib/Checker/GRState.cpp
parentb241cf6f69aeed9f80ec528bc9cb5c9894e6684a (diff)
Rename: GRState::getSVal(Stmt*) => getExprVal(),
GRState::getSVal(MemRegion*) => Load(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRState.cpp')
-rw-r--r--lib/Checker/GRState.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp
index 592f930316..c533dceee5 100644
--- a/lib/Checker/GRState.cpp
+++ b/lib/Checker/GRState.cpp
@@ -69,7 +69,7 @@ const GRState *GRState::unbindLoc(Loc LV) const {
return getStateManager().getPersistentState(NewSt);
}
-SVal GRState::getSValAsScalarOrLoc(const MemRegion *R) const {
+SVal GRState::LoadAsScalarOrLoc(const MemRegion *R) const {
// We only want to do fetches from regions that we can actually bind
// values. For example, SymbolicRegions of type 'id<...>' cannot
// have direct bindings (but their can be bindings on their subregions).
@@ -79,7 +79,7 @@ SVal GRState::getSValAsScalarOrLoc(const MemRegion *R) const {
if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) {
QualType T = TR->getValueType(getStateManager().getContext());
if (Loc::IsLocType(T) || T->isIntegerType())
- return getSVal(R);
+ return Load(R);
}
return UnknownVal();
@@ -297,7 +297,7 @@ bool ScanReachableSymbols::scan(const MemRegion *R) {
return false;
// Now look at the binding to this region (if any).
- if (!scan(state->getSValAsScalarOrLoc(R)))
+ if (!scan(state->LoadAsScalarOrLoc(R)))
return false;
// Now look at the subregions.
@@ -341,7 +341,7 @@ bool GRState::scanReachableSymbols(const MemRegion * const *I,
bool GRStateManager::isEqual(const GRState* state, const Expr* Ex,
const llvm::APSInt& Y) {
- SVal V = state->getSVal(Ex);
+ SVal V = state->getExprVal(Ex);
if (loc::ConcreteInt* X = dyn_cast<loc::ConcreteInt>(&V))
return X->getValue() == Y;