unsigned Count = Builder.getCurrentBlockCount();
SymbolID Sym = Eng.getSymbolManager().getConjuredSymbol(Ex, Count);
- RVal X = Ex->getType()->isPointerType()
- ? cast<RVal>(lval::SymbolVal(Sym))
- : cast<RVal>(nonlval::SymbolVal(Sym));
+ RVal X = LVal::IsLValType(Ex->getType())
+ ? cast<RVal>(lval::SymbolVal(Sym))
+ : cast<RVal>(nonlval::SymbolVal(Sym));
St = StateMgr.SetRVal(St, Ex, X, Eng.getCFG().isBlkExpr(Ex), false);
}
// abstract address of the base object.
NodeSet Tmp;
- if (IsPointerType(Base->getType())) // Base always is an LVal.
+ if (LVal::IsLValType(Base->getType())) // Base always is an LVal.
Visit(Base, Pred, Tmp);
else
VisitLVal(Base, Pred, Tmp);
if (asLVal) {
- if (IsPointerType(Base->getType())) // Base always is an LVal.
+ if (LVal::IsLValType(Base->getType())) // Base always is an LVal.
Visit(Base, Pred, Tmp);
else
VisitLVal(Base, Pred, Tmp);
ValueState* St = GetState(*I);
RVal BaseV = GetRVal(St, Base);
- if (IsPointerType(Base->getType())) {
+ if (LVal::IsLValType(Base->getType())) {
assert (M->isArrow());
}
// Check for casts from pointers to integers.
- if (T->isIntegerType() && IsPointerType(ExTy)) {
+ if (T->isIntegerType() && LVal::IsLValType(ExTy)) {
unsigned bits = getContext().getTypeSize(ExTy);
// FIXME: Determine if the number of bits of the target type is
}
// Check for casts from integers to pointers.
- if (IsPointerType(T) && ExTy->isIntegerType())
+ if (LVal::IsLValType(T) && ExTy->isIntegerType())
if (nonlval::LValAsInteger *LV = dyn_cast<nonlval::LValAsInteger>(&V)) {
// Just unpackage the lval and return it.
V = LV->getLVal();
QualType T = VD->getType();
- if (IsPointerType(T))
+ if (LVal::IsLValType(T))
St = SetRVal(St, lval::DeclVal(VD),
lval::ConcreteInt(BasicVals.getValue(0, T)));
else if (T->isIntegerType())
QualType T = VD->getType();
- if (IsPointerType(T) || T->isIntegerType()) {
+ if (LVal::IsLValType(T) || T->isIntegerType()) {
RVal V = Ex ? GetRVal(St, Ex) : UndefinedVal();
unsigned Count = Builder->getCurrentBlockCount();
SymbolID Sym = SymMgr.getConjuredSymbol(Ex, Count);
- V = IsPointerType(Ex->getType())
+ V = LVal::IsLValType(Ex->getType())
? cast<RVal>(lval::SymbolVal(Sym))
: cast<RVal>(nonlval::SymbolVal(Sym));
}
unsigned Count = Builder->getCurrentBlockCount();
SymbolID Sym = SymMgr.getConjuredSymbol(B->getRHS(), Count);
- RightV = IsPointerType(B->getRHS()->getType())
+ RightV = LVal::IsLValType(B->getRHS()->getType())
? cast<RVal>(lval::SymbolVal(Sym))
: cast<RVal>(nonlval::SymbolVal(Sym));
}
BasicValueFactory& BasicVals = Eng.getBasicVals();
llvm::APSInt V = cast<nonlval::ConcreteInt>(X).getValue();
- V.setIsUnsigned(T->isUnsignedIntegerType() || IsPointerType(T));
+ V.setIsUnsigned(T->isUnsignedIntegerType() || LVal::IsLValType(T));
V.extOrTrunc(Eng.getContext().getTypeSize(T));
- if (IsPointerType(T))
+ if (LVal::IsLValType(T))
return lval::ConcreteInt(BasicVals.getValue(V));
else
return nonlval::ConcreteInt(BasicVals.getValue(V));
// can be introduced by the frontend for corner cases, e.g
// casting from va_list* to __builtin_va_list&.
//
- if (IsPointerType(T) || T->isReferenceType())
+ if (LVal::IsLValType(T) || T->isReferenceType())
return X;
assert (T->isIntegerType());
BasicValueFactory& BasicVals = Eng.getBasicVals();
llvm::APSInt V = cast<lval::ConcreteInt>(X).getValue();
- V.setIsUnsigned(T->isUnsignedIntegerType() || IsPointerType(T));
+ V.setIsUnsigned(T->isUnsignedIntegerType() || LVal::IsLValType(T));
V.extOrTrunc(Eng.getContext().getTypeSize(T));
return nonlval::ConcreteInt(BasicVals.getValue(V));
unsigned Count = Builder.getCurrentBlockCount();
SymbolID Sym = Eng.getSymbolManager().getConjuredSymbol(CE, Count);
- RVal X = IsPointerType(CE->getType())
+ RVal X = LVal::IsLValType(CE->getType())
? cast<RVal>(lval::SymbolVal(Sym))
: cast<RVal>(nonlval::SymbolVal(Sym));