Fix generous source of VC++ truncation warnings.

llvm-svn: 25311
This commit is contained in:
Jeff Cohen 2006-01-14 02:17:20 +00:00
parent f6b7dd7ca9
commit 8f8504b3c6
1 changed files with 2 additions and 2 deletions

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