diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-16 04:49:44 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-11-16 04:49:44 +0000 |
commit | 652be346f74feba027bcbdeb6a3e3f4755a0e62c (patch) | |
tree | 7ac0e7954d742066961437ffac9fa882da4a7dca /lib/Analysis/RegionStore.cpp | |
parent | 7f92f0362ef2cf218bc19bb83e1a97dd254b5527 (diff) |
* Do the same thing to the basicstore as in r84163.
* Add a load type to GRExprEngine::EvalLoad().
* When retrieve from 'theValue' of OSAtomic funcitions, use the type of the
region instead of the argument expression as the load type.
* Then we can convert CastRetrievedSVal to a pure assertion. In the future
we can let all Retrieve() methods simply return SVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 46cddd0da1..ae3fa14c2a 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -1029,16 +1029,20 @@ RegionStoreManager::Retrieve(const GRState *state, Loc L, QualType T) { return SValuator::CastResult(state, UnknownVal()); if (const FieldRegion* FR = dyn_cast<FieldRegion>(R)) - return CastRetrievedVal(RetrieveField(state, FR), state, FR, T); + return SValuator::CastResult(state, + CastRetrievedVal(RetrieveField(state, FR), FR, T)); if (const ElementRegion* ER = dyn_cast<ElementRegion>(R)) - return CastRetrievedVal(RetrieveElement(state, ER), state, ER, T); + return SValuator::CastResult(state, + CastRetrievedVal(RetrieveElement(state, ER), ER, T)); if (const ObjCIvarRegion *IVR = dyn_cast<ObjCIvarRegion>(R)) - return CastRetrievedVal(RetrieveObjCIvar(state, IVR), state, IVR, T); + return SValuator::CastResult(state, + CastRetrievedVal(RetrieveObjCIvar(state, IVR), IVR, T)); if (const VarRegion *VR = dyn_cast<VarRegion>(R)) - return CastRetrievedVal(RetrieveVar(state, VR), state, VR, T); + return SValuator::CastResult(state, + CastRetrievedVal(RetrieveVar(state, VR), VR, T)); RegionBindings B = GetRegionBindings(state->getStore()); RegionBindings::data_type* V = B.lookup(R); |