CompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr. As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time.
llvm-svn: 58437
This commit is contained in:
@@ -245,9 +245,9 @@ NonLoc NonLoc::MakeIntTruthVal(BasicValueFactory& BasicVals, bool b) {
|
||||
return nonloc::ConcreteInt(BasicVals.getTruthValue(b));
|
||||
}
|
||||
|
||||
NonLoc NonLoc::MakeCompoundVal(QualType T, SVal* Vals, unsigned NumSVals,
|
||||
NonLoc NonLoc::MakeCompoundVal(QualType T, llvm::ImmutableList<SVal> Vals,
|
||||
BasicValueFactory& BasicVals) {
|
||||
return nonloc::CompoundVal(BasicVals.getCompoundValData(T, Vals, NumSVals));
|
||||
return nonloc::CompoundVal(BasicVals.getCompoundValData(T, Vals));
|
||||
}
|
||||
|
||||
SVal SVal::GetSymbolValue(SymbolManager& SymMgr, VarDecl* D) {
|
||||
@@ -260,6 +260,11 @@ SVal SVal::GetSymbolValue(SymbolManager& SymMgr, VarDecl* D) {
|
||||
return nonloc::SymbolVal(SymMgr.getSymbol(D));
|
||||
}
|
||||
|
||||
nonloc::LocAsInteger nonloc::LocAsInteger::Make(BasicValueFactory& Vals, Loc V,
|
||||
unsigned Bits) {
|
||||
return LocAsInteger(Vals.getPersistentSValWithData(V, Bits));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Utility methods for constructing Locs.
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -353,7 +358,7 @@ void NonLoc::print(std::ostream& Out) const {
|
||||
Out << " [as " << C.getNumBits() << " bit integer]";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
default:
|
||||
assert (false && "Pretty-printed not implemented for this NonLoc.");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user