[llvm-commits] CVS: llvm/lib/Analysis/Expressions.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 23 10:17:02 PDT 2003
Changes in directory llvm/lib/Analysis:
Expressions.cpp updated: 1.34 -> 1.35
---
Log message:
Eliminate old-style cast
---
Diffs of the changes:
Index: llvm/lib/Analysis/Expressions.cpp
diff -u llvm/lib/Analysis/Expressions.cpp:1.34 llvm/lib/Analysis/Expressions.cpp:1.35
--- llvm/lib/Analysis/Expressions.cpp:1.34 Mon Jul 14 12:26:34 2003
+++ llvm/lib/Analysis/Expressions.cpp Wed Jul 23 10:16:40 2003
@@ -276,7 +276,7 @@
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
More information about the llvm-commits
mailing list