aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/ConstantRange.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-12 23:36:14 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-12 23:36:14 +0000
commitd977d8651a5cd26a3e1088267f31cade405f2adf (patch)
tree56a269fe411951fa288d6a08c32f3d74b8bf8794 /lib/Analysis/ConstantRange.cpp
parentebc0922eeb5b728d33a68d4bea8128413f62e369 (diff)
downloadexternal_llvm-d977d8651a5cd26a3e1088267f31cade405f2adf.zip
external_llvm-d977d8651a5cd26a3e1088267f31cade405f2adf.tar.gz
external_llvm-d977d8651a5cd26a3e1088267f31cade405f2adf.tar.bz2
Replace inferred getCast(V,Ty) calls with more strict variants.
Rename getZeroExtend and getSignExtend to getZExt and getSExt to match the the casting mnemonics in the rest of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ConstantRange.cpp')
-rw-r--r--lib/Analysis/ConstantRange.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp
index 2c21586..762d5c3 100644
--- a/lib/Analysis/ConstantRange.cpp
+++ b/lib/Analysis/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));
}