BasicValueFactory: getMinValue/getMaxValue can be applied to any location type as specified by Loc::IsLocType().

llvm-svn: 64832
This commit is contained in:
Ted Kremenek 2009-02-17 22:21:44 +00:00
parent 2620a06fe7
commit bf30d54580
1 changed files with 4 additions and 6 deletions

View File

@ -90,16 +90,14 @@ public:
}
inline const llvm::APSInt& getMaxValue(QualType T) {
assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
T->isBlockPointerType();
assert(T->isIntegerType() || Loc::IsLocType(T));
bool isUnsigned = T->isUnsignedIntegerType() || Loc::IsLocType(T);
return getValue(llvm::APSInt::getMaxValue(Ctx.getTypeSize(T), isUnsigned));
}
inline const llvm::APSInt& getMinValue(QualType T) {
assert(T->isIntegerType() || T->isPointerType() || T->isBlockPointerType());
bool isUnsigned = T->isUnsignedIntegerType() || T->isPointerType() ||
T->isBlockPointerType();
assert(T->isIntegerType() || Loc::IsLocType(T));
bool isUnsigned = T->isUnsignedIntegerType() || Loc::IsLocType(T);
return getValue(llvm::APSInt::getMinValue(Ctx.getTypeSize(T), isUnsigned));
}