diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-05-02 21:15:08 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-05-02 21:15:08 +0000 |
commit | 48e8c80e1791adb7a07b8fd6e27edcdfbb756950 (patch) | |
tree | 980d5dc4eec0cf8e316288fc47b9ff465264244b /include | |
parent | e818f770bb4f6617612e5b61cc067aa7da9e1395 (diff) | |
download | llvm-48e8c80e1791adb7a07b8fd6e27edcdfbb756950.tar.gz llvm-48e8c80e1791adb7a07b8fd6e27edcdfbb756950.tar.bz2 llvm-48e8c80e1791adb7a07b8fd6e27edcdfbb756950.tar.xz |
Suppress -Wshorten-64-to-32 warnings for 64-bit hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50590 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/APInt.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 737c5e620f..49b243bf34 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -31,7 +31,8 @@ namespace llvm { typedef uint64_t integerPart; const unsigned int host_char_bit = 8; - const unsigned int integerPartWidth = host_char_bit * sizeof(integerPart); + const unsigned int integerPartWidth = host_char_bit * + static_cast<unsigned int>(sizeof(integerPart)); //===----------------------------------------------------------------------===// // APInt Class @@ -76,8 +77,10 @@ class APInt { /// This enum is used to hold the constants we needed for APInt. enum { - APINT_BITS_PER_WORD = sizeof(uint64_t) * 8, ///< Bits in a word - APINT_WORD_SIZE = sizeof(uint64_t) ///< Byte size of a word + /// Bits in a word + APINT_BITS_PER_WORD = static_cast<unsigned int>(sizeof(uint64_t)) * 8, + /// Byte size of a word + APINT_WORD_SIZE = static_cast<unsigned int>(sizeof(uint64_t)) }; /// This constructor is used only internally for speed of construction of |