[llvm-commits] CVS: llvm/lib/Transforms/TransformInternals.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 23 10:23:25 PDT 2003
Changes in directory llvm/lib/Transforms:
TransformInternals.h updated: 1.18 -> 1.19
---
Log message:
Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting
---
Diffs of the changes:
Index: llvm/lib/Transforms/TransformInternals.h
diff -u llvm/lib/Transforms/TransformInternals.h:1.18 llvm/lib/Transforms/TransformInternals.h:1.19
--- llvm/lib/Transforms/TransformInternals.h:1.18 Tue May 20 13:45:33 2003
+++ llvm/lib/Transforms/TransformInternals.h Wed Jul 23 10:22:23 2003
@@ -16,9 +16,7 @@
#include <set>
static inline int64_t getConstantValue(const ConstantInt *CPI) {
- if (const ConstantSInt *CSI = dyn_cast<ConstantSInt>(CPI))
- return CSI->getValue();
- return (int64_t)cast<ConstantUInt>(CPI)->getValue();
+ return (int64_t)cast<ConstantInt>(CPI)->getRawValue();
}
More information about the llvm-commits
mailing list