Add support for reading and writing pointersize/endianness to and from bytecode
[oota-llvm.git] / lib / Transforms / TransformInternals.h
index 7a2dbf1b69cf3c7e635134d52f81f71acf260c81..867dd5d4abea7a293017d215690bc0c42f474cef 100644 (file)
 //
 extern const TargetData TD;
 
-static inline int getConstantValue(const ConstantInt *CPI) {
+static inline int64_t getConstantValue(const ConstantInt *CPI) {
   if (const ConstantSInt *CSI = dyn_cast<ConstantSInt>(CPI))
-    return (int)CSI->getValue();
-  return (int)cast<ConstantUInt>(CPI)->getValue();
+    return CSI->getValue();
+  return (int64_t)cast<ConstantUInt>(CPI)->getValue();
 }