diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:52:58 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:52:58 +0000 |
commit | 5f970ec96e421f64db6b1c6509a902ea73d98cc7 (patch) | |
tree | 0dd020f28a4846707f8d60717d9b2921ea187bd8 /include/llvm/Support/MathExtras.h | |
parent | 62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a (diff) | |
download | FreeBSD-src-5f970ec96e421f64db6b1c6509a902ea73d98cc7.zip FreeBSD-src-5f970ec96e421f64db6b1c6509a902ea73d98cc7.tar.gz |
Update LLVM to r100520.
Diffstat (limited to 'include/llvm/Support/MathExtras.h')
-rw-r--r-- | include/llvm/Support/MathExtras.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h index f56241c..80d11ae 100644 --- a/include/llvm/Support/MathExtras.h +++ b/include/llvm/Support/MathExtras.h @@ -459,14 +459,14 @@ inline int64_t abs64(int64_t x) { /// SignExtend32 - Sign extend B-bit number x to 32-bit int. /// Usage int32_t r = SignExtend32<5>(x); -template <unsigned B> inline int32_t SignExtend32(int32_t x) { - return (x << (32 - B)) >> (32 - B); +template <unsigned B> inline int32_t SignExtend32(uint32_t x) { + return int32_t(x << (32 - B)) >> (32 - B); } /// SignExtend64 - Sign extend B-bit number x to 64-bit int. /// Usage int64_t r = SignExtend64<5>(x); -template <unsigned B> inline int64_t SignExtend64(int32_t x) { - return (x << (64 - B)) >> (64 - B); +template <unsigned B> inline int64_t SignExtend64(uint64_t x) { + return int64_t(x << (64 - B)) >> (64 - B); } } // End llvm namespace |