mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 06:03:52 +00:00
Make ScalarEvolution::getConstant support pointer types, for consistency
with ScalarEvolution's overall approach to pointer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb9dda6946
commit
a560fd28c0
@ -188,8 +188,8 @@ const SCEV *ScalarEvolution::getConstant(const APInt& Val) {
|
||||
|
||||
const SCEV *
|
||||
ScalarEvolution::getConstant(const Type *Ty, uint64_t V, bool isSigned) {
|
||||
return getConstant(
|
||||
ConstantInt::get(cast<IntegerType>(Ty), V, isSigned));
|
||||
const IntegerType *ITy = cast<IntegerType>(getEffectiveSCEVType(Ty));
|
||||
return getConstant(ConstantInt::get(ITy, V, isSigned));
|
||||
}
|
||||
|
||||
const Type *SCEVConstant::getType() const { return V->getType(); }
|
||||
|
Loading…
Reference in New Issue
Block a user