- 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
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 2a43b9a..c7ff0ae 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -2139,8 +2139,7 @@
// 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 @@
// 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 @@
!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 @@
// 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);