Fix generous source of VC++ truncation warnings.
authorJeff Cohen <jeffc@jolt-lang.org>
Sat, 14 Jan 2006 02:17:20 +0000 (02:17 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Sat, 14 Jan 2006 02:17:20 +0000 (02:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25311 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/MathExtras.h

index 1935f77b49ab9e119ef9f1dce4162583fbc297d9..65f6ed3f753a4a578f1aa9c70de59397756b0d6d 100644 (file)
@@ -100,8 +100,8 @@ inline unsigned ByteSwap_32(unsigned Value) {
 // ByteSwap_64 - This function returns a byte-swapped representation of the
 // 64-bit argument, Value.
 inline uint64_t ByteSwap_64(uint64_t Value) {
-  uint64_t Hi = ByteSwap_32(Value);
-  uint64_t Lo = ByteSwap_32(Value >> 32);
+  uint64_t Hi = ByteSwap_32(unsigned(Value));
+  uint64_t Lo = ByteSwap_32(unsigned(Value >> 32));
   return (Hi << 32) | Lo;
 }