[cfe-commits] r95540 - /cfe/trunk/lib/Checker/BasicStore.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Mon Feb 8 00:48:06 PST 2010
Author: zhongxingxu
Date: Mon Feb 8 02:48:05 2010
New Revision: 95540
URL: http://llvm.org/viewvc/llvm-project?rev=95540&view=rev
Log:
BindInternal is redundant. Remove it.
Modified:
cfe/trunk/lib/Checker/BasicStore.cpp
Modified: cfe/trunk/lib/Checker/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/BasicStore.cpp?rev=95540&r1=95539&r2=95540&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/BasicStore.cpp (original)
+++ cfe/trunk/lib/Checker/BasicStore.cpp Mon Feb 8 02:48:05 2010
@@ -49,14 +49,10 @@
Store InvalidateRegion(Store store, const MemRegion *R, const Expr *E,
unsigned Count, InvalidatedSymbols *IS);
- Store Bind(Store store, Loc L, SVal V) {
- return BindInternal(store, L, V);
- }
-
Store scanForIvars(Stmt *B, const Decl* SelfDecl,
const MemRegion *SelfRegion, Store St);
- Store BindInternal(Store St, Loc loc, SVal V);
+ Store Bind(Store St, Loc loc, SVal V);
Store Remove(Store St, Loc loc);
Store getInitialStore(const LocationContext *InitLoc);
@@ -167,7 +163,7 @@
return UnknownVal();
}
-Store BasicStoreManager::BindInternal(Store store, Loc loc, SVal V) {
+Store BasicStoreManager::Bind(Store store, Loc loc, SVal V) {
if (isa<loc::ConcreteInt>(loc))
return store;
@@ -326,7 +322,7 @@
const MemRegion *IVR = MRMgr.getObjCIvarRegion(IV->getDecl(),
SelfRegion);
SVal X = ValMgr.getRegionValueSymbolVal(IVR);
- St = BindInternal(St, ValMgr.makeLoc(IVR), X);
+ St = Bind(St, ValMgr.makeLoc(IVR), X);
}
}
}
@@ -359,8 +355,7 @@
const MemRegion *SelfRegion =
ValMgr.getRegionValueSymbolVal(VR).getAsRegion();
assert(SelfRegion);
- St = BindInternal(St, ValMgr.makeLoc(VR),
- loc::MemRegionVal(SelfRegion));
+ St = Bind(St, ValMgr.makeLoc(VR), loc::MemRegionVal(SelfRegion));
// Scan the method for ivar references. While this requires an
// entire AST scan, the cost should not be high in practice.
St = scanForIvars(MD->getBody(), PD, SelfRegion, St);
@@ -379,7 +374,7 @@
if (R->hasGlobalsOrParametersStorage())
X = ValMgr.getRegionValueSymbolVal(R);
- St = BindInternal(St, ValMgr.makeLoc(R), X);
+ St = Bind(St, ValMgr.makeLoc(R), X);
}
}
return St;
@@ -417,16 +412,16 @@
if (!InitVal) {
QualType T = VD->getType();
if (Loc::IsLocType(T))
- store = BindInternal(store, loc::MemRegionVal(VR),
+ store = Bind(store, loc::MemRegionVal(VR),
loc::ConcreteInt(BasicVals.getValue(0, T)));
else if (T->isIntegerType())
- store = BindInternal(store, loc::MemRegionVal(VR),
+ store = Bind(store, loc::MemRegionVal(VR),
nonloc::ConcreteInt(BasicVals.getValue(0, T)));
else {
// assert(0 && "ignore other types of variables");
}
} else {
- store = BindInternal(store, loc::MemRegionVal(VR), *InitVal);
+ store = Bind(store, loc::MemRegionVal(VR), *InitVal);
}
}
} else {
@@ -434,7 +429,7 @@
QualType T = VD->getType();
if (ValMgr.getSymbolManager().canSymbolicate(T)) {
SVal V = InitVal ? *InitVal : UndefinedVal();
- store = BindInternal(store, loc::MemRegionVal(VR), V);
+ store = Bind(store, loc::MemRegionVal(VR), V);
}
}
More information about the cfe-commits
mailing list