Add casts for documentation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-04-16 22:10:52 +00:00
parent 169bffe28a
commit 4a94a70250

View 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();
}