diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-21 06:27:32 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-21 06:27:32 +0000 |
commit | 8485ec6a1d7d7f25ea680ea3740bc1a11d2bb7cd (patch) | |
tree | 47b77ba39e330c4cd5078cbc899282a0e9d969eb /lib/Analysis/RegionStore.cpp | |
parent | 65e5e4054bdce29917995cb31934e96af62263b9 (diff) |
Modify Store interface: GetSVal/SetSVal => Retrieve/Bind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 905370720b..f936fff1b9 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -38,8 +38,8 @@ public: virtual ~RegionStoreManager() {} - SVal GetSVal(Store S, Loc L, QualType T); - Store SetSVal(Store St, Loc LV, SVal V); + SVal Retrieve(Store S, Loc L, QualType T); + Store Bind(Store St, Loc LV, SVal V); Store getInitialStore(); @@ -65,7 +65,7 @@ Loc RegionStoreManager::getElementLoc(const VarDecl* VD, SVal Idx) { return loc::MemRegionVal(ER); } -SVal RegionStoreManager::GetSVal(Store S, Loc L, QualType T) { +SVal RegionStoreManager::Retrieve(Store S, Loc L, QualType T) { assert(!isa<UnknownVal>(L) && "location unknown"); assert(!isa<UndefinedVal>(L) && "location undefined"); @@ -97,7 +97,7 @@ SVal RegionStoreManager::GetSVal(Store S, Loc L, QualType T) { } } -Store RegionStoreManager::SetSVal(Store store, Loc LV, SVal V) { +Store RegionStoreManager::Bind(Store store, Loc LV, SVal V) { assert(LV.getSubKind() == loc::MemRegionKind); const MemRegion* R = cast<loc::MemRegionVal>(LV).getRegion(); @@ -135,7 +135,7 @@ Store RegionStoreManager::getInitialStore() { ? SVal::GetSymbolValue(StateMgr.getSymbolManager(), VD) : UndefinedVal(); - St = SetSVal(St, getVarLoc(VD), X); + St = Bind(St, getVarLoc(VD), X); } } } @@ -160,16 +160,16 @@ Store RegionStoreManager::AddDecl(Store store, QualType T = VD->getType(); if (Loc::IsLocType(T)) - store = SetSVal(store, getVarLoc(VD), - loc::ConcreteInt(BasicVals.getValue(0, T))); + store = Bind(store, getVarLoc(VD), + loc::ConcreteInt(BasicVals.getValue(0, T))); else if (T->isIntegerType()) - store = SetSVal(store, getVarLoc(VD), - loc::ConcreteInt(BasicVals.getValue(0, T))); + store = Bind(store, getVarLoc(VD), + loc::ConcreteInt(BasicVals.getValue(0, T))); else assert("ignore other types of variables"); } else { - store = SetSVal(store, getVarLoc(VD), InitVal); + store = Bind(store, getVarLoc(VD), InitVal); } } } else { @@ -186,7 +186,7 @@ Store RegionStoreManager::AddDecl(Store store, ? cast<SVal>(loc::SymbolVal(Sym)) : cast<SVal>(nonloc::SymbolVal(Sym)); } - store = SetSVal(store, getVarLoc(VD), V); + store = Bind(store, getVarLoc(VD), V); } else if (T->isArrayType()) { // Only handle constant size array. @@ -197,7 +197,7 @@ Store RegionStoreManager::AddDecl(Store store, for (llvm::APInt i = llvm::APInt::getNullValue(Size.getBitWidth()); i != Size; ++i) { nonloc::ConcreteInt Idx(BasicVals.getValue(llvm::APSInt(i))); - store = SetSVal(store, getElementLoc(VD, Idx), UndefinedVal()); + store = Bind(store, getElementLoc(VD, Idx), UndefinedVal()); } } } else if (T->isStructureType()) { |