aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/Expressions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 15:16:40 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 15:16:40 +0000
commit28a128e37a42ab2a6677dffef2834e2c09be7e1a (patch)
tree26f10ac7364e846cc36967ab13158d0a4a3114e2 /lib/Analysis/Expressions.cpp
parent9daa8a12d33412d3d7c78f7b5a00f0883e388b58 (diff)
Eliminate old-style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Expressions.cpp')
-rw-r--r--lib/Analysis/Expressions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/Expressions.cpp b/lib/Analysis/Expressions.cpp
index f1016a50db..7733b81819 100644
--- a/lib/Analysis/Expressions.cpp
+++ b/lib/Analysis/Expressions.cpp
@@ -276,7 +276,7 @@ ExprType ClassifyExpression(Value *Expr) {
if (Right.Offset == 0) return Left; // shl x, 0 = x
assert(Right.Offset->getType() == Type::UByteTy &&
"Shift amount must always be a unsigned byte!");
- uint64_t ShiftAmount = ((ConstantUInt*)Right.Offset)->getValue();
+ uint64_t ShiftAmount = cast<ConstantUInt>(Right.Offset)->getValue();
ConstantInt *Multiplier = getUnsignedConstant(1ULL << ShiftAmount, Ty);
// We don't know how to classify it if they are shifting by more than what