diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-12-02 07:49:45 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-12-02 07:49:45 +0000 |
| commit | 90af90967a7cfb349f105873997e0488111ec14a (patch) | |
| tree | cce87540db9ef8e78ffc34f739ade82c303826e0 /clang/lib/Checker/Store.cpp | |
| parent | 4375586bd907530a429029e41cd31602e3456ea8 (diff) | |
| download | bcm5719-llvm-90af90967a7cfb349f105873997e0488111ec14a.tar.gz bcm5719-llvm-90af90967a7cfb349f105873997e0488111ec14a.zip | |
Merge ValueManager into SValBuilder.
llvm-svn: 120696
Diffstat (limited to 'clang/lib/Checker/Store.cpp')
| -rw-r--r-- | clang/lib/Checker/Store.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/clang/lib/Checker/Store.cpp b/clang/lib/Checker/Store.cpp index 5f1a1e1d09a..55a0efaa45b 100644 --- a/clang/lib/Checker/Store.cpp +++ b/clang/lib/Checker/Store.cpp @@ -18,8 +18,8 @@ using namespace clang; StoreManager::StoreManager(GRStateManager &stateMgr) - : ValMgr(stateMgr.getValueManager()), StateMgr(stateMgr), - MRMgr(ValMgr.getRegionManager()), Ctx(stateMgr.getContext()) {} + : svalBuilder(stateMgr.getSValBuilder()), StateMgr(stateMgr), + MRMgr(svalBuilder.getRegionManager()), Ctx(stateMgr.getContext()) {} Store StoreManager::EnterStackFrame(const GRState *state, const StackFrameContext *frame) { @@ -28,8 +28,8 @@ Store StoreManager::EnterStackFrame(const GRState *state, const MemRegion *StoreManager::MakeElementRegion(const MemRegion *Base, QualType EleTy, uint64_t index) { - NonLoc idx = ValMgr.makeArrayIndex(index); - return MRMgr.getElementRegion(EleTy, idx, Base, ValMgr.getContext()); + NonLoc idx = svalBuilder.makeArrayIndex(index); + return MRMgr.getElementRegion(EleTy, idx, Base, svalBuilder.getContext()); } // FIXME: Merge with the implementation of the same method in MemRegion.cpp @@ -45,7 +45,7 @@ static bool IsCompleteType(ASTContext &Ctx, QualType Ty) { const ElementRegion *StoreManager::GetElementZeroRegion(const MemRegion *R, QualType T) { - NonLoc idx = ValMgr.makeZeroArrayIndex(); + NonLoc idx = svalBuilder.makeZeroArrayIndex(); assert(!T.isNull()); return MRMgr.getElementRegion(T, idx, R, Ctx); } @@ -212,7 +212,7 @@ SVal StoreManager::CastRetrievedVal(SVal V, const TypedRegion *R, if (castTy.isNull()) return V; - ASTContext &Ctx = ValMgr.getContext(); + ASTContext &Ctx = svalBuilder.getContext(); if (performTestOnly) { // Automatically translate references to pointers. @@ -220,14 +220,14 @@ SVal StoreManager::CastRetrievedVal(SVal V, const TypedRegion *R, if (const ReferenceType *RT = T->getAs<ReferenceType>()) T = Ctx.getPointerType(RT->getPointeeType()); - assert(ValMgr.getContext().hasSameUnqualifiedType(castTy, T)); + assert(svalBuilder.getContext().hasSameUnqualifiedType(castTy, T)); return V; } if (const Loc *L = dyn_cast<Loc>(&V)) - return ValMgr.getSValBuilder().evalCastL(*L, castTy); + return svalBuilder.evalCastL(*L, castTy); else if (const NonLoc *NL = dyn_cast<NonLoc>(&V)) - return ValMgr.getSValBuilder().evalCastNL(*NL, castTy); + return svalBuilder.evalCastNL(*NL, castTy); return V; } @@ -284,7 +284,7 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, const ElementRegion *ElemR = dyn_cast<ElementRegion>(BaseRegion); // Convert the offset to the appropriate size and signedness. - Offset = cast<NonLoc>(ValMgr.convertToArrayIndex(Offset)); + Offset = cast<NonLoc>(svalBuilder.convertToArrayIndex(Offset)); if (!ElemR) { // @@ -323,7 +323,7 @@ SVal StoreManager::getLValueElement(QualType elementType, NonLoc Offset, assert(BaseIdxI.isSigned()); // Compute the new index. - nonloc::ConcreteInt NewIdx(ValMgr.getBasicValueFactory().getValue(BaseIdxI + + nonloc::ConcreteInt NewIdx(svalBuilder.getBasicValueFactory().getValue(BaseIdxI + OffI)); // Construct the new ElementRegion. |

