Add casts for documentation
authorChris Lattner <sabre@nondot.org>
Tue, 16 Apr 2002 22:10:52 +0000 (22:10 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 Apr 2002 22:10:52 +0000 (22:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2272 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/TransformInternals.h

index 30e3990df48bc65cd2c523d94d9f6bbc0b1be758..a93f63ece1523dfd2d676aa4970184d5f1ff852e 100644 (file)
@@ -26,8 +26,8 @@ extern const TargetData TD;
 
 static inline int getConstantValue(const ConstantInt *CPI) {
   if (const ConstantSInt *CSI = dyn_cast<ConstantSInt>(CPI))
-    return CSI->getValue();
-  return cast<ConstantUInt>(CPI)->getValue();
+    return (int)CSI->getValue();
+  return (int)cast<ConstantUInt>(CPI)->getValue();
 }