diff options
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r-- | lib/Support/ConstantRange.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index 2c215866c6..762d5c358a 100644 --- a/lib/Support/ConstantRange.cpp +++ b/lib/Support/ConstantRange.cpp @@ -340,8 +340,8 @@ ConstantRange ConstantRange::zeroExtend(const Type *Ty) const { Constant *Lower = getLower(); Constant *Upper = getUpper(); - return ConstantRange(ConstantExpr::getCast(Instruction::ZExt, Lower, Ty), - ConstantExpr::getCast(Instruction::ZExt, Upper, Ty)); + return ConstantRange(ConstantExpr::getZExt(Lower, Ty), + ConstantExpr::getZExt(Upper, Ty)); } /// truncate - Return a new range in the specified integer type, which must be @@ -356,8 +356,8 @@ ConstantRange ConstantRange::truncate(const Type *Ty) const { return ConstantRange(getType()); return ConstantRange( - ConstantExpr::getCast(Instruction::Trunc, getLower(), Ty), - ConstantExpr::getCast(Instruction::Trunc, getUpper(), Ty)); + ConstantExpr::getTrunc(getLower(), Ty), + ConstantExpr::getTrunc(getUpper(), Ty)); } |