diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-09 22:22:44 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-09 22:22:44 +0000 |
commit | 8d7f5481a0eeb4c0508202a4bd2b754cfa93c4fe (patch) | |
tree | fbd4f2479b757e9694ffa66acf47cb6a12e72496 /lib/Analysis/GRExprEngine.cpp | |
parent | c612f7bc9a6379cd7e7c2dd306d05938e890051b (diff) |
- Move ownership of MemRegionManager into ValueManager.
- Pull SVal::GetConjuredSymbol() and friends into ValueManager. This greatly
simplifies the calling interface to clients.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 2a43b9a89e..c7ff0aec27 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -2139,8 +2139,7 @@ void GRExprEngine::VisitDeclStmt(DeclStmt* DS, NodeTy* Pred, NodeSet& Dst) { // UnknownVal. if (InitVal.isUnknown() || !getConstraintManager().canReasonAbout(InitVal)) { - InitVal = SVal::GetConjuredSymbolVal(SymMgr, - getStoreManager().getRegionManager(), InitEx, Count); + InitVal = ValMgr.getConjuredSymbolVal(InitEx, Count); } state = StateMgr.BindDecl(state, VD, InitVal); @@ -2531,9 +2530,8 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred, // Conjure a new symbol if necessary to recover precision. if (Result.isUnknown() || !getConstraintManager().canReasonAbout(Result)) - Result = SVal::GetConjuredSymbolVal(SymMgr, - getStoreManager().getRegionManager(),Ex, - Builder->getCurrentBlockCount()); + Result = ValMgr.getConjuredSymbolVal(Ex, + Builder->getCurrentBlockCount()); state = BindExpr(state, U, U->isPostfix() ? V2 : Result); @@ -2758,10 +2756,8 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B, !getConstraintManager().canReasonAbout(RightV)) && (Loc::IsLocType(T) || (T->isScalarType() && T->isIntegerType()))) { - unsigned Count = Builder->getCurrentBlockCount(); - - RightV = SVal::GetConjuredSymbolVal(SymMgr, - getStoreManager().getRegionManager(), B->getRHS(), Count); + unsigned Count = Builder->getCurrentBlockCount(); + RightV = ValMgr.getConjuredSymbolVal(B->getRHS(), Count); } // Simulate the effects of a "store": bind the value of the RHS @@ -2932,8 +2928,7 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B, // The symbolic value is actually for the type of the left-hand side // expression, not the computation type, as this is the value the // LValue on the LHS will bind to. - LHSVal = SVal::GetConjuredSymbolVal(SymMgr, - getStoreManager().getRegionManager(), B->getRHS(), LTy, Count); + LHSVal = ValMgr.getConjuredSymbolVal(B->getRHS(), LTy, Count); // However, we need to convert the symbol to the computation type. Result = (LTy == CTy) ? LHSVal : EvalCast(LHSVal,CTy); |