-// ValueManager.h - Low-level value management for Value Tracking -*- C++ -*--==
+//=== BasicValueFactory.cpp - Basic values for Path Sens analysis --*- C++ -*-//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file defines ValueManager, a class that manages the lifetime of APSInt
-// objects and symbolic constraints used by GRExprEngine and related classes.
+// This file defines BasicValueFactory, a class that manages the lifetime
+// of APSInt objects and symbolic constraints used by GRExprEngine
+// and related classes.
//
//===----------------------------------------------------------------------===//
-#include "clang/Analysis/PathSensitive/ValueManager.h"
+#include "clang/Analysis/PathSensitive/BasicValueFactory.h"
using namespace clang;
-ValueManager::~ValueManager() {
+BasicValueFactory::~BasicValueFactory() {
// Note that the dstor for the contents of APSIntSet will never be called,
// so we iterate over the set and invoke the dstor for each APSInt. This
// frees an aux. memory allocated to represent very large constants.
I->getValue().~APSInt();
}
-const llvm::APSInt& ValueManager::getValue(const llvm::APSInt& X) {
+const llvm::APSInt& BasicValueFactory::getValue(const llvm::APSInt& X) {
llvm::FoldingSetNodeID ID;
void* InsertPos;
typedef llvm::FoldingSetNodeWrapper<llvm::APSInt> FoldNodeTy;
return *P;
}
-const llvm::APSInt& ValueManager::getValue(uint64_t X, unsigned BitWidth,
+const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth,
bool isUnsigned) {
llvm::APSInt V(BitWidth, isUnsigned);
V = X;
return getValue(V);
}
-const llvm::APSInt& ValueManager::getValue(uint64_t X, QualType T) {
+const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, QualType T) {
unsigned bits = Ctx.getTypeSize(T);
llvm::APSInt V(bits, T->isUnsignedIntegerType());
}
const SymIntConstraint&
-ValueManager::getConstraint(SymbolID sym, BinaryOperator::Opcode Op,
+BasicValueFactory::getConstraint(SymbolID sym, BinaryOperator::Opcode Op,
const llvm::APSInt& V) {
llvm::FoldingSetNodeID ID;
}
const llvm::APSInt*
-ValueManager::EvaluateAPSInt(BinaryOperator::Opcode Op,
+BasicValueFactory::EvaluateAPSInt(BinaryOperator::Opcode Op,
const llvm::APSInt& V1, const llvm::APSInt& V2) {
switch (Op) {
void CFRefCount::EvalCall(ExplodedNodeSet<ValueState>& Dst,
ValueStateManager& StateMgr,
GRStmtNodeBuilder<ValueState>& Builder,
- ValueManager& ValMgr,
+ BasicValueFactory& BasicVals,
CallExpr* CE, LVal L,
ExplodedNode<ValueState>* Pred) {
virtual void EvalCall(ExplodedNodeSet<ValueState>& Dst,
ValueStateManager& StateMgr,
GRStmtNodeBuilder<ValueState>& Builder,
- ValueManager& ValMgr,
+ BasicValueFactory& BasicVals,
CallExpr* CE, LVal L,
ExplodedNode<ValueState>* Pred);
};
// This should be easy once we have "ranges" for NonLVals.
do {
- nonlval::ConcreteInt CaseVal(ValMgr.getValue(V1));
+ nonlval::ConcreteInt CaseVal(BasicVals.getValue(V1));
RVal Res = EvalBinOp(BinaryOperator::EQ, CondV, CaseVal);
if (T->isPointerType()) {
St = SetRVal(St, lval::DeclVal(VD),
- lval::ConcreteInt(ValMgr.getValue(0, T)));
+ lval::ConcreteInt(BasicVals.getValue(0, T)));
}
else if (T->isIntegerType()) {
St = SetRVal(St, lval::DeclVal(VD),
- nonlval::ConcreteInt(ValMgr.getValue(0, T)));
+ nonlval::ConcreteInt(BasicVals.getValue(0, T)));
}
Nodify(Dst, Ex, Pred,
SetRVal(Pred->getState(), Ex,
- NonLVal::MakeVal(ValMgr, size, Ex->getType())));
+ NonLVal::MakeVal(BasicVals, size, Ex->getType())));
}
// transfer functions as "0 == E".
if (isa<LVal>(SubV)) {
- lval::ConcreteInt V(ValMgr.getZeroWithPtrWidth());
+ lval::ConcreteInt V(BasicVals.getZeroWithPtrWidth());
RVal Result = EvalBinOp(BinaryOperator::EQ, cast<LVal>(SubV), V);
St = SetRVal(St, U, Result);
}
else {
Expr* Ex = U->getSubExpr();
- nonlval::ConcreteInt V(ValMgr.getValue(0, Ex->getType()));
+ nonlval::ConcreteInt V(BasicVals.getValue(0, Ex->getType()));
RVal Result = EvalBinOp(BinaryOperator::EQ, cast<NonLVal>(SubV), V);
St = SetRVal(St, U, Result);
}
uint64_t size = getContext().getTypeSize(T) / 8;
ValueState* St = Pred->getState();
- St = SetRVal(St, U, NonLVal::MakeVal(ValMgr, size, U->getType()));
+ St = SetRVal(St, U, NonLVal::MakeVal(BasicVals, size, U->getType()));
Nodify(Dst, U, Pred, St);
}
case lval::SymbolValKind:
if (Assumption)
return AssumeSymNE(St, cast<lval::SymbolVal>(Cond).getSymbol(),
- ValMgr.getZeroWithPtrWidth(), isFeasible);
+ BasicVals.getZeroWithPtrWidth(), isFeasible);
else
return AssumeSymEQ(St, cast<lval::SymbolVal>(Cond).getSymbol(),
- ValMgr.getZeroWithPtrWidth(), isFeasible);
+ BasicVals.getZeroWithPtrWidth(), isFeasible);
case lval::DeclValKind:
SymbolID sym = SV.getSymbol();
if (Assumption)
- return AssumeSymNE(St, sym, ValMgr.getValue(0, SymMgr.getType(sym)),
+ return AssumeSymNE(St, sym, BasicVals.getValue(0, SymMgr.getType(sym)),
isFeasible);
else
- return AssumeSymEQ(St, sym, ValMgr.getValue(0, SymMgr.getType(sym)),
+ return AssumeSymEQ(St, sym, BasicVals.getValue(0, SymMgr.getType(sym)),
isFeasible);
}
// Transfer function for Casts.
//===----------------------------------------------------------------------===//
-RVal GRSimpleVals::EvalCast(ValueManager& ValMgr, NonLVal X, QualType T) {
+RVal GRSimpleVals::EvalCast(BasicValueFactory& BasicVals, NonLVal X, QualType T) {
if (!isa<nonlval::ConcreteInt>(X))
return UnknownVal();
llvm::APSInt V = cast<nonlval::ConcreteInt>(X).getValue();
V.setIsUnsigned(T->isUnsignedIntegerType() || T->isPointerType());
- V.extOrTrunc(ValMgr.getContext().getTypeSize(T));
+ V.extOrTrunc(BasicVals.getContext().getTypeSize(T));
if (T->isPointerType())
- return lval::ConcreteInt(ValMgr.getValue(V));
+ return lval::ConcreteInt(BasicVals.getValue(V));
else
- return nonlval::ConcreteInt(ValMgr.getValue(V));
+ return nonlval::ConcreteInt(BasicVals.getValue(V));
}
// Casts.
-RVal GRSimpleVals::EvalCast(ValueManager& ValMgr, LVal X, QualType T) {
+RVal GRSimpleVals::EvalCast(BasicValueFactory& BasicVals, LVal X, QualType T) {
if (T->isPointerType() || T->isReferenceType())
return X;
llvm::APSInt V = cast<lval::ConcreteInt>(X).getValue();
V.setIsUnsigned(T->isUnsignedIntegerType() || T->isPointerType());
- V.extOrTrunc(ValMgr.getContext().getTypeSize(T));
+ V.extOrTrunc(BasicVals.getContext().getTypeSize(T));
- return nonlval::ConcreteInt(ValMgr.getValue(V));
+ return nonlval::ConcreteInt(BasicVals.getValue(V));
}
// Unary operators.
-RVal GRSimpleVals::EvalMinus(ValueManager& ValMgr, UnaryOperator* U, NonLVal X){
+RVal GRSimpleVals::EvalMinus(BasicValueFactory& BasicVals, UnaryOperator* U, NonLVal X){
switch (X.getSubKind()) {
case nonlval::ConcreteIntKind:
- return cast<nonlval::ConcreteInt>(X).EvalMinus(ValMgr, U);
+ return cast<nonlval::ConcreteInt>(X).EvalMinus(BasicVals, U);
default:
return UnknownVal();
}
}
-RVal GRSimpleVals::EvalComplement(ValueManager& ValMgr, NonLVal X) {
+RVal GRSimpleVals::EvalComplement(BasicValueFactory& BasicVals, NonLVal X) {
switch (X.getSubKind()) {
case nonlval::ConcreteIntKind:
- return cast<nonlval::ConcreteInt>(X).EvalComplement(ValMgr);
+ return cast<nonlval::ConcreteInt>(X).EvalComplement(BasicVals);
default:
return UnknownVal();
// Binary operators.
-RVal GRSimpleVals::EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+RVal GRSimpleVals::EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
NonLVal L, NonLVal R) {
while (1) {
if (isa<nonlval::ConcreteInt>(R)) {
const nonlval::ConcreteInt& L_CI = cast<nonlval::ConcreteInt>(L);
const nonlval::ConcreteInt& R_CI = cast<nonlval::ConcreteInt>(R);
- return L_CI.EvalBinOp(ValMgr, Op, R_CI);
+ return L_CI.EvalBinOp(BasicVals, Op, R_CI);
}
else {
NonLVal tmp = R;
if (isa<nonlval::ConcreteInt>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<nonlval::SymbolVal>(L).getSymbol(), Op,
+ BasicVals.getConstraint(cast<nonlval::SymbolVal>(L).getSymbol(), Op,
cast<nonlval::ConcreteInt>(R).getValue());
return nonlval::SymIntConstraintVal(C);
// Binary Operators (except assignments and comma).
-RVal GRSimpleVals::EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+RVal GRSimpleVals::EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, LVal R) {
switch (Op) {
return UnknownVal();
case BinaryOperator::EQ:
- return EvalEQ(ValMgr, L, R);
+ return EvalEQ(BasicVals, L, R);
case BinaryOperator::NE:
- return EvalNE(ValMgr, L, R);
+ return EvalNE(BasicVals, L, R);
}
}
// Pointer arithmetic.
-RVal GRSimpleVals::EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+RVal GRSimpleVals::EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, NonLVal R) {
return UnknownVal();
}
// Equality operators for LVals.
-RVal GRSimpleVals::EvalEQ(ValueManager& ValMgr, LVal L, LVal R) {
+RVal GRSimpleVals::EvalEQ(BasicValueFactory& BasicVals, LVal L, LVal R) {
switch (L.getSubKind()) {
bool b = cast<lval::ConcreteInt>(L).getValue() ==
cast<lval::ConcreteInt>(R).getValue();
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
else if (isa<lval::SymbolVal>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
BinaryOperator::EQ,
cast<lval::ConcreteInt>(L).getValue());
if (isa<lval::ConcreteInt>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(L).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(L).getSymbol(),
BinaryOperator::EQ,
cast<lval::ConcreteInt>(R).getValue());
case lval::DeclValKind:
case lval::FuncValKind:
case lval::GotoLabelKind:
- return NonLVal::MakeIntTruthVal(ValMgr, L == R);
+ return NonLVal::MakeIntTruthVal(BasicVals, L == R);
}
- return NonLVal::MakeIntTruthVal(ValMgr, false);
+ return NonLVal::MakeIntTruthVal(BasicVals, false);
}
-RVal GRSimpleVals::EvalNE(ValueManager& ValMgr, LVal L, LVal R) {
+RVal GRSimpleVals::EvalNE(BasicValueFactory& BasicVals, LVal L, LVal R) {
switch (L.getSubKind()) {
bool b = cast<lval::ConcreteInt>(L).getValue() !=
cast<lval::ConcreteInt>(R).getValue();
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
else if (isa<lval::SymbolVal>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
BinaryOperator::NE,
cast<lval::ConcreteInt>(L).getValue());
case lval::SymbolValKind: {
if (isa<lval::ConcreteInt>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(L).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(L).getSymbol(),
BinaryOperator::NE,
cast<lval::ConcreteInt>(R).getValue());
case lval::DeclValKind:
case lval::FuncValKind:
case lval::GotoLabelKind:
- return NonLVal::MakeIntTruthVal(ValMgr, L != R);
+ return NonLVal::MakeIntTruthVal(BasicVals, L != R);
}
- return NonLVal::MakeIntTruthVal(ValMgr, true);
+ return NonLVal::MakeIntTruthVal(BasicVals, true);
}
//===----------------------------------------------------------------------===//
void GRSimpleVals::EvalCall(ExplodedNodeSet<ValueState>& Dst,
ValueStateManager& StateMgr,
GRStmtNodeBuilder<ValueState>& Builder,
- ValueManager& ValMgr,
+ BasicValueFactory& BasicVals,
CallExpr* CE, LVal L,
ExplodedNode<ValueState>* Pred) {
// Casts.
- virtual RVal EvalCast(ValueManager& ValMgr, NonLVal V, QualType CastT);
- virtual RVal EvalCast(ValueManager& ValMgr, LVal V, QualType CastT);
+ virtual RVal EvalCast(BasicValueFactory& BasicVals, NonLVal V, QualType CastT);
+ virtual RVal EvalCast(BasicValueFactory& BasicVals, LVal V, QualType CastT);
// Unary Operators.
- virtual RVal EvalMinus(ValueManager& ValMgr, UnaryOperator* U, NonLVal X);
+ virtual RVal EvalMinus(BasicValueFactory& BasicVals, UnaryOperator* U, NonLVal X);
- virtual RVal EvalComplement(ValueManager& ValMgr, NonLVal X);
+ virtual RVal EvalComplement(BasicValueFactory& BasicVals, NonLVal X);
// Binary Operators.
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
NonLVal L, NonLVal R);
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, LVal R);
// Pointer arithmetic.
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, NonLVal R);
// Calls.
virtual void EvalCall(ExplodedNodeSet<ValueState>& Dst,
ValueStateManager& StateMgr,
GRStmtNodeBuilder<ValueState>& Builder,
- ValueManager& ValMgr,
+ BasicValueFactory& BasicVals,
CallExpr* CE, LVal L,
ExplodedNode<ValueState>* Pred);
// Equality operators for LVals.
- RVal EvalEQ(ValueManager& ValMgr, LVal L, LVal R);
- RVal EvalNE(ValueManager& ValMgr, LVal L, LVal R);
+ RVal EvalEQ(BasicValueFactory& BasicVals, LVal L, LVal R);
+ RVal EvalNE(BasicValueFactory& BasicVals, LVal L, LVal R);
};
} // end clang namespace
//===----------------------------------------------------------------------===//
RVal
-nonlval::ConcreteInt::EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+nonlval::ConcreteInt::EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
const nonlval::ConcreteInt& R) const {
- const llvm::APSInt* X = ValMgr.EvaluateAPSInt(Op, getValue(), R.getValue());
+ const llvm::APSInt* X = BasicVals.EvaluateAPSInt(Op, getValue(), R.getValue());
if (X)
return nonlval::ConcreteInt(*X);
// Bitwise-Complement.
nonlval::ConcreteInt
-nonlval::ConcreteInt::EvalComplement(ValueManager& ValMgr) const {
- return ValMgr.getValue(~getValue());
+nonlval::ConcreteInt::EvalComplement(BasicValueFactory& BasicVals) const {
+ return BasicVals.getValue(~getValue());
}
// Unary Minus.
nonlval::ConcreteInt
-nonlval::ConcreteInt::EvalMinus(ValueManager& ValMgr, UnaryOperator* U) const {
+nonlval::ConcreteInt::EvalMinus(BasicValueFactory& BasicVals, UnaryOperator* U) const {
assert (U->getType() == U->getSubExpr()->getType());
assert (U->getType()->isIntegerType());
- return ValMgr.getValue(-getValue());
+ return BasicVals.getValue(-getValue());
}
//===----------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
RVal
-lval::ConcreteInt::EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+lval::ConcreteInt::EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
const lval::ConcreteInt& R) const {
assert (Op == BinaryOperator::Add || Op == BinaryOperator::Sub ||
(Op >= BinaryOperator::LT && Op <= BinaryOperator::NE));
- const llvm::APSInt* X = ValMgr.EvaluateAPSInt(Op, getValue(), R.getValue());
+ const llvm::APSInt* X = BasicVals.EvaluateAPSInt(Op, getValue(), R.getValue());
if (X)
return lval::ConcreteInt(*X);
return UndefinedVal();
}
-NonLVal LVal::EQ(ValueManager& ValMgr, const LVal& R) const {
+NonLVal LVal::EQ(BasicValueFactory& BasicVals, const LVal& R) const {
switch (getSubKind()) {
default:
bool b = cast<lval::ConcreteInt>(this)->getValue() ==
cast<lval::ConcreteInt>(R).getValue();
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
else if (isa<lval::SymbolVal>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
BinaryOperator::EQ,
cast<lval::ConcreteInt>(this)->getValue());
if (isa<lval::ConcreteInt>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(this)->getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(this)->getSymbol(),
BinaryOperator::EQ,
cast<lval::ConcreteInt>(R).getValue());
case lval::DeclValKind:
if (isa<lval::DeclVal>(R)) {
bool b = cast<lval::DeclVal>(*this) == cast<lval::DeclVal>(R);
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
break;
}
- return NonLVal::MakeIntTruthVal(ValMgr, false);
+ return NonLVal::MakeIntTruthVal(BasicVals, false);
}
-NonLVal LVal::NE(ValueManager& ValMgr, const LVal& R) const {
+NonLVal LVal::NE(BasicValueFactory& BasicVals, const LVal& R) const {
switch (getSubKind()) {
default:
assert(false && "NE not implemented for this LVal.");
bool b = cast<lval::ConcreteInt>(this)->getValue() !=
cast<lval::ConcreteInt>(R).getValue();
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
else if (isa<lval::SymbolVal>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(R).getSymbol(),
BinaryOperator::NE,
cast<lval::ConcreteInt>(this)->getValue());
if (isa<lval::ConcreteInt>(R)) {
const SymIntConstraint& C =
- ValMgr.getConstraint(cast<lval::SymbolVal>(this)->getSymbol(),
+ BasicVals.getConstraint(cast<lval::SymbolVal>(this)->getSymbol(),
BinaryOperator::NE,
cast<lval::ConcreteInt>(R).getValue());
case lval::DeclValKind:
if (isa<lval::DeclVal>(R)) {
bool b = cast<lval::DeclVal>(*this) == cast<lval::DeclVal>(R);
- return NonLVal::MakeIntTruthVal(ValMgr, b);
+ return NonLVal::MakeIntTruthVal(BasicVals, b);
}
break;
}
- return NonLVal::MakeIntTruthVal(ValMgr, true);
+ return NonLVal::MakeIntTruthVal(BasicVals, true);
}
//===----------------------------------------------------------------------===//
// Utility methods for constructing Non-LVals.
//===----------------------------------------------------------------------===//
-NonLVal NonLVal::MakeVal(ValueManager& ValMgr, uint64_t X, QualType T) {
- return nonlval::ConcreteInt(ValMgr.getValue(X, T));
+NonLVal NonLVal::MakeVal(BasicValueFactory& BasicVals, uint64_t X, QualType T) {
+ return nonlval::ConcreteInt(BasicVals.getValue(X, T));
}
-NonLVal NonLVal::MakeVal(ValueManager& ValMgr, IntegerLiteral* I) {
+NonLVal NonLVal::MakeVal(BasicValueFactory& BasicVals, IntegerLiteral* I) {
- return nonlval::ConcreteInt(ValMgr.getValue(APSInt(I->getValue(),
+ return nonlval::ConcreteInt(BasicVals.getValue(APSInt(I->getValue(),
I->getType()->isUnsignedIntegerType())));
}
-NonLVal NonLVal::MakeIntTruthVal(ValueManager& ValMgr, bool b) {
- return nonlval::ConcreteInt(ValMgr.getTruthValue(b));
+NonLVal NonLVal::MakeIntTruthVal(BasicValueFactory& BasicVals, bool b) {
+ return nonlval::ConcreteInt(BasicVals.getTruthValue(b));
}
RVal RVal::GetSymbolValue(SymbolManager& SymMgr, VarDecl* D) {
// are comparing states using pointer equality. Perhaps there is
// a better way, since APInts are fairly lightweight.
- return nonlval::ConcreteInt(ValMgr.getValue(ED->getInitVal()));
+ return nonlval::ConcreteInt(BasicVals.getValue(ED->getInitVal()));
}
else if (FunctionDecl* FD = dyn_cast<FunctionDecl>(D))
return lval::FuncVal(FD);
case Stmt::CharacterLiteralClass: {
CharacterLiteral* C = cast<CharacterLiteral>(E);
- return NonLVal::MakeVal(ValMgr, C->getValue(), C->getType());
+ return NonLVal::MakeVal(BasicVals, C->getValue(), C->getType());
}
case Stmt::IntegerLiteralClass: {
- return NonLVal::MakeVal(ValMgr, cast<IntegerLiteral>(E));
+ return NonLVal::MakeVal(BasicVals, cast<IntegerLiteral>(E));
}
// Casts where the source and target type are the same
switch (E->getStmtClass()) {
case Stmt::CharacterLiteralClass: {
CharacterLiteral* C = cast<CharacterLiteral>(E);
- return NonLVal::MakeVal(ValMgr, C->getValue(), C->getType());
+ return NonLVal::MakeVal(BasicVals, C->getValue(), C->getType());
}
case Stmt::IntegerLiteralClass: {
- return NonLVal::MakeVal(ValMgr, cast<IntegerLiteral>(E));
+ return NonLVal::MakeVal(BasicVals, cast<IntegerLiteral>(E));
}
default: {
35BB2D7D0D19951A00944DB5 /* TranslationUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BB2D7C0D19951A00944DB5 /* TranslationUnit.cpp */; };
35BB2D7F0D19954000944DB5 /* ASTConsumer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35BB2D7E0D19954000944DB5 /* ASTConsumer.cpp */; };
35CFFE000CA1CBCB00E6F2BE /* StmtViz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35CFFDFF0CA1CBCB00E6F2BE /* StmtViz.cpp */; };
+ 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */; };
+ 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 35D55B250D81D8C60092E734 /* CFRefCount.cpp */; };
84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84AF36A00CB17A3B00C820A5 /* DeclObjC.h */; };
84D9A8880C1A57E100AC7ABC /* AttributeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84D9A8870C1A57E100AC7ABC /* AttributeList.cpp */; };
84D9A88C0C1A581300AC7ABC /* AttributeList.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 84D9A88B0C1A581300AC7ABC /* AttributeList.h */; };
DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */; };
DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */; };
DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */; };
- DE4121390D7F1C1C0080F80A /* ValueManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212B0D7F1C1C0080F80A /* ValueManager.cpp */; };
DE41213A0D7F1C1C0080F80A /* LiveVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212D0D7F1C1C0080F80A /* LiveVariables.cpp */; };
DE41213B0D7F1C1C0080F80A /* RValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212E0D7F1C1C0080F80A /* RValues.cpp */; };
DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE41212F0D7F1C1C0080F80A /* GRSimpleVals.cpp */; };
35CFFE010CA1CBDD00E6F2BE /* StmtGraphTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StmtGraphTraits.h; path = clang/AST/StmtGraphTraits.h; sourceTree = "<group>"; };
35D1DDD10CA9C6D50096E967 /* DataflowSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowSolver.h; path = clang/Analysis/FlowSensitive/DataflowSolver.h; sourceTree = "<group>"; };
35D1DDD20CA9C6D50096E967 /* DataflowValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataflowValues.h; path = clang/Analysis/FlowSensitive/DataflowValues.h; sourceTree = "<group>"; };
+ 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BasicValueFactory.cpp; path = Analysis/BasicValueFactory.cpp; sourceTree = "<group>"; };
+ 35D55B250D81D8C60092E734 /* CFRefCount.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFRefCount.cpp; path = Analysis/CFRefCount.cpp; sourceTree = "<group>"; };
+ 35D55B260D81D8C60092E734 /* CFRefCount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFRefCount.h; path = Analysis/CFRefCount.h; sourceTree = "<group>"; };
+ 35D55B290D81D8E50092E734 /* BasicValueFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BasicValueFactory.h; path = clang/Analysis/PathSensitive/BasicValueFactory.h; sourceTree = "<group>"; };
35F9B1530D1C6ADF00DDFDAE /* ExprDeclBitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExprDeclBitVector.h; path = clang/Analysis/Support/ExprDeclBitVector.h; sourceTree = "<group>"; };
35F9B1550D1C6B2E00DDFDAE /* LiveVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LiveVariables.h; path = clang/Analysis/Analyses/LiveVariables.h; sourceTree = "<group>"; };
35F9B1560D1C6B2E00DDFDAE /* UninitializedValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UninitializedValues.h; path = clang/Analysis/Analyses/UninitializedValues.h; sourceTree = "<group>"; };
DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = Driver/ASTConsumers.cpp; sourceTree = "<group>"; };
DE3986EF0CB8D4B300223765 /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IdentifierTable.h; sourceTree = "<group>"; };
DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = "<group>"; };
- DE41211A0D7F1BBE0080F80A /* ValueManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueManager.h; path = clang/Analysis/PathSensitive/ValueManager.h; sourceTree = "<group>"; };
DE41211B0D7F1BBE0080F80A /* RValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RValues.h; path = clang/Analysis/PathSensitive/RValues.h; sourceTree = "<group>"; };
DE41211C0D7F1BBE0080F80A /* ValueState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueState.h; path = clang/Analysis/PathSensitive/ValueState.h; sourceTree = "<group>"; };
DE41211D0D7F1BBE0080F80A /* GRWorkList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRWorkList.h; path = clang/Analysis/PathSensitive/GRWorkList.h; sourceTree = "<group>"; };
DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExplodedGraph.cpp; path = Analysis/ExplodedGraph.cpp; sourceTree = "<group>"; };
DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UninitializedValues.cpp; path = Analysis/UninitializedValues.cpp; sourceTree = "<group>"; };
DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GRCoreEngine.cpp; path = Analysis/GRCoreEngine.cpp; sourceTree = "<group>"; };
- DE41212B0D7F1C1C0080F80A /* ValueManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueManager.cpp; path = Analysis/ValueManager.cpp; sourceTree = "<group>"; };
DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRSimpleVals.h; path = Analysis/GRSimpleVals.h; sourceTree = "<group>"; };
DE41212D0D7F1C1C0080F80A /* LiveVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LiveVariables.cpp; path = Analysis/LiveVariables.cpp; sourceTree = "<group>"; };
DE41212E0D7F1C1C0080F80A /* RValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RValues.cpp; path = Analysis/RValues.cpp; sourceTree = "<group>"; };
356EF9B30C8F7DCA006650F5 /* Analysis */ = {
isa = PBXGroup;
children = (
+ 35D55B240D81D8C60092E734 /* BasicValueFactory.cpp */,
+ 35D55B250D81D8C60092E734 /* CFRefCount.cpp */,
+ 35D55B260D81D8C60092E734 /* CFRefCount.h */,
356EF9B40C8F7DDF006650F5 /* LiveVariables.cpp */,
DE4121250D7F1C1C0080F80A /* ValueState.cpp */,
DE4121260D7F1C1C0080F80A /* DeadStores.cpp */,
DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */,
DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */,
DE41212A0D7F1C1C0080F80A /* GRCoreEngine.cpp */,
- DE41212B0D7F1C1C0080F80A /* ValueManager.cpp */,
DE41212C0D7F1C1C0080F80A /* GRSimpleVals.h */,
DE41212D0D7F1C1C0080F80A /* LiveVariables.cpp */,
DE41212E0D7F1C1C0080F80A /* RValues.cpp */,
DE4121130D7F1B980080F80A /* PathSensitive */ = {
isa = PBXGroup;
children = (
- DE41211A0D7F1BBE0080F80A /* ValueManager.h */,
+ 35D55B290D81D8E50092E734 /* BasicValueFactory.h */,
DE41211B0D7F1BBE0080F80A /* RValues.h */,
DE41211C0D7F1BBE0080F80A /* ValueState.h */,
DE41211D0D7F1BBE0080F80A /* GRWorkList.h */,
DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */,
DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */,
DE4121380D7F1C1C0080F80A /* GRCoreEngine.cpp in Sources */,
- DE4121390D7F1C1C0080F80A /* ValueManager.cpp in Sources */,
DE41213A0D7F1C1C0080F80A /* LiveVariables.cpp in Sources */,
DE41213B0D7F1C1C0080F80A /* RValues.cpp in Sources */,
DE41213C0D7F1C1C0080F80A /* GRSimpleVals.cpp in Sources */,
DE41213D0D7F1C1C0080F80A /* GRBlockCounter.cpp in Sources */,
DE41213E0D7F1C1C0080F80A /* GRExprEngine.cpp in Sources */,
DE41213F0D7F1C1C0080F80A /* ProgramPoint.cpp in Sources */,
+ 35D55B270D81D8C60092E734 /* BasicValueFactory.cpp in Sources */,
+ 35D55B280D81D8C60092E734 /* CFRefCount.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
-// ValueManager.h - Low-level value management for Value Tracking -*- C++ -*--==
+//=== BasicValueFactory.h - Basic values for Path Sens analysis --*- C++ -*---//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
//
-// This file defines ValueManager, a class that manages the lifetime of APSInt
-// objects and symbolic constraints used by GRExprEngine and related classes.
+// This file defines BasicValueFactory, a class that manages the lifetime
+// of APSInt objects and symbolic constraints used by GRExprEngine
+// and related classes.
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_ANALYSIS_VALUEMANAGER_H
-#define LLVM_CLANG_ANALYSIS_VALUEMANAGER_H
+#ifndef LLVM_CLANG_ANALYSIS_BASICVALUEFACTORY_H
+#define LLVM_CLANG_ANALYSIS_BASICVALUEFACTORY_H
#include "clang/Analysis/PathSensitive/SymbolManager.h"
#include "clang/AST/ASTContext.h"
namespace clang {
-class ValueManager {
+class BasicValueFactory {
typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt> >
APSIntSetTy;
SymIntCSetTy SymIntCSet;
public:
- ValueManager(ASTContext& ctx, llvm::BumpPtrAllocator& Alloc)
+ BasicValueFactory(ASTContext& ctx, llvm::BumpPtrAllocator& Alloc)
: Ctx(ctx), BPAlloc(Alloc) {}
- ~ValueManager();
+ ~BasicValueFactory();
ASTContext& getContext() const { return Ctx; }
ValueStateManager StateMgr;
/// ValueMgr - Object that manages the data for all created RVals.
- ValueManager& ValMgr;
+ BasicValueFactory& BasicVals;
/// TF - Object that represents a bundle of transfer functions
/// for manipulating and creating RVals.
G(g), Liveness(G.getCFG(), G.getFunctionDecl()),
Builder(NULL),
StateMgr(G.getContext(), G.getAllocator()),
- ValMgr(StateMgr.getValueManager()),
+ BasicVals(StateMgr.getBasicValueFactory()),
TF(NULL), // FIXME.
SymMgr(StateMgr.getSymbolManager()),
StmtEntryNode(NULL), CurrentStmt(NULL) {
}
inline NonLVal MakeConstantVal(uint64_t X, Expr* Ex) {
- return NonLVal::MakeVal(ValMgr, X, Ex->getType());
+ return NonLVal::MakeVal(BasicVals, X, Ex->getType());
}
/// Assume - Create new state by assuming that a given expression
return X;
if (isa<LVal>(X))
- return TF->EvalCast(ValMgr, cast<LVal>(X), CastT);
+ return TF->EvalCast(BasicVals, cast<LVal>(X), CastT);
else
- return TF->EvalCast(ValMgr, cast<NonLVal>(X), CastT);
+ return TF->EvalCast(BasicVals, cast<NonLVal>(X), CastT);
}
RVal EvalMinus(UnaryOperator* U, RVal X) {
- return X.isValid() ? TF->EvalMinus(ValMgr, U, cast<NonLVal>(X)) : X;
+ return X.isValid() ? TF->EvalMinus(BasicVals, U, cast<NonLVal>(X)) : X;
}
RVal EvalComplement(RVal X) {
- return X.isValid() ? TF->EvalComplement(ValMgr, cast<NonLVal>(X)) : X;
+ return X.isValid() ? TF->EvalComplement(BasicVals, cast<NonLVal>(X)) : X;
}
RVal EvalBinOp(BinaryOperator::Opcode Op, NonLVal L, RVal R) {
- return R.isValid() ? TF->EvalBinOp(ValMgr, Op, L, cast<NonLVal>(R)) : R;
+ return R.isValid() ? TF->EvalBinOp(BasicVals, Op, L, cast<NonLVal>(R)) : R;
}
RVal EvalBinOp(BinaryOperator::Opcode Op, NonLVal L, NonLVal R) {
- return R.isValid() ? TF->EvalBinOp(ValMgr, Op, L, R) : R;
+ return R.isValid() ? TF->EvalBinOp(BasicVals, Op, L, R) : R;
}
RVal EvalBinOp(BinaryOperator::Opcode Op, RVal L, RVal R) {
if (isa<LVal>(L)) {
if (isa<LVal>(R))
- return TF->EvalBinOp(ValMgr, Op, cast<LVal>(L), cast<LVal>(R));
+ return TF->EvalBinOp(BasicVals, Op, cast<LVal>(L), cast<LVal>(R));
else
- return TF->EvalBinOp(ValMgr, Op, cast<LVal>(L), cast<NonLVal>(R));
+ return TF->EvalBinOp(BasicVals, Op, cast<LVal>(L), cast<NonLVal>(R));
}
- return TF->EvalBinOp(ValMgr, Op, cast<NonLVal>(L), cast<NonLVal>(R));
+ return TF->EvalBinOp(BasicVals, Op, cast<NonLVal>(L), cast<NonLVal>(R));
}
void EvalCall(NodeSet& Dst, CallExpr* CE, LVal L, NodeTy* Pred) {
assert (Builder && "GRStmtNodeBuilder must be defined.");
- return TF->EvalCall(Dst, StateMgr, *Builder, ValMgr, CE, L, Pred);
+ return TF->EvalCall(Dst, StateMgr, *Builder, BasicVals, CE, L, Pred);
}
ValueState* MarkBranch(ValueState* St, Stmt* Terminator, bool branchTaken);
// Casts.
- virtual RVal EvalCast(ValueManager& ValMgr, NonLVal V, QualType CastT) =0;
- virtual RVal EvalCast(ValueManager& ValMgr, LVal V, QualType CastT) = 0;
+ virtual RVal EvalCast(BasicValueFactory& BasicVals, NonLVal V, QualType CastT) =0;
+ virtual RVal EvalCast(BasicValueFactory& BasicVals, LVal V, QualType CastT) = 0;
// Unary Operators.
- virtual RVal EvalMinus(ValueManager& ValMgr, UnaryOperator* U, NonLVal X) = 0;
+ virtual RVal EvalMinus(BasicValueFactory& BasicVals, UnaryOperator* U, NonLVal X) = 0;
- virtual RVal EvalComplement(ValueManager& ValMgr, NonLVal X) = 0;
+ virtual RVal EvalComplement(BasicValueFactory& BasicVals, NonLVal X) = 0;
// Binary Operators.
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
NonLVal L, NonLVal R) = 0;
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, LVal R) = 0;
// Pointer arithmetic.
- virtual RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ virtual RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
LVal L, NonLVal R) = 0;
// Calls.
virtual void EvalCall(ExplodedNodeSet<ValueState>& Dst,
ValueStateManager& StateMgr,
GRStmtNodeBuilder<ValueState>& Builder,
- ValueManager& ValMgr, CallExpr* CE, LVal L,
+ BasicValueFactory& BasicVals, CallExpr* CE, LVal L,
ExplodedNode<ValueState>* Pred) = 0;
};
#ifndef LLVM_CLANG_ANALYSIS_RVALUE_H
#define LLVM_CLANG_ANALYSIS_RVALUE_H
-#include "clang/Analysis/PathSensitive/ValueManager.h"
+#include "clang/Analysis/PathSensitive/BasicValueFactory.h"
#include "llvm/Support/Casting.h"
//==------------------------------------------------------------------------==//
void print(std::ostream& Out) const;
// Utility methods to create NonLVals.
- static NonLVal MakeVal(ValueManager& ValMgr, uint64_t X, QualType T);
+ static NonLVal MakeVal(BasicValueFactory& BasicVals, uint64_t X, QualType T);
- static NonLVal MakeVal(ValueManager& ValMgr, IntegerLiteral* I);
+ static NonLVal MakeVal(BasicValueFactory& BasicVals, IntegerLiteral* I);
- static NonLVal MakeIntTruthVal(ValueManager& ValMgr, bool b);
+ static NonLVal MakeIntTruthVal(BasicValueFactory& BasicVals, bool b);
// Implement isa<T> support.
static inline bool classof(const RVal* V) {
: RVal(const_cast<void*>(D), true, SubKind) {}
// Equality operators.
- NonLVal EQ(ValueManager& ValMgr, const LVal& R) const;
- NonLVal NE(ValueManager& ValMgr, const LVal& R) const;
+ NonLVal EQ(BasicValueFactory& BasicVals, const LVal& R) const;
+ NonLVal NE(BasicValueFactory& BasicVals, const LVal& R) const;
public:
void print(std::ostream& Out) const;
}
// Transfer functions for binary/unary operations on ConcreteInts.
- RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
const ConcreteInt& R) const;
- ConcreteInt EvalComplement(ValueManager& ValMgr) const;
+ ConcreteInt EvalComplement(BasicValueFactory& BasicVals) const;
- ConcreteInt EvalMinus(ValueManager& ValMgr, UnaryOperator* U) const;
+ ConcreteInt EvalMinus(BasicValueFactory& BasicVals, UnaryOperator* U) const;
// Implement isa<T> support.
static inline bool classof(const RVal* V) {
}
// Transfer functions for binary/unary operations on ConcreteInts.
- RVal EvalBinOp(ValueManager& ValMgr, BinaryOperator::Opcode Op,
+ RVal EvalBinOp(BasicValueFactory& BasicVals, BinaryOperator::Opcode Op,
const ConcreteInt& R) const;
// Implement isa<T> support.
llvm::FoldingSet<ValueState> StateSet;
/// ValueMgr - Object that manages the data for all created RVals.
- ValueManager ValMgr;
+ BasicValueFactory BasicVals;
/// SymMgr - Object that manages the symbol information.
SymbolManager SymMgr;
VBFactory(alloc),
CNEFactory(alloc),
CEFactory(alloc),
- ValMgr(Ctx, alloc),
+ BasicVals(Ctx, alloc),
Alloc(alloc) {}
ValueState* getInitialState();
- ValueManager& getValueManager() { return ValMgr; }
+ BasicValueFactory& getBasicValueFactory() { return BasicVals; }
SymbolManager& getSymbolManager() { return SymMgr; }
ValueState* RemoveDeadBindings(ValueState* St, Stmt* Loc,