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 | 279e2c4ff68df22921298ef5a5c0f9b998c512c1 (patch) | |
tree | 980d5dc4eec0cf8e316288fc47b9ff465264244b /include | |
parent | c374c86dce6213a826c99b72c673e4ad48844a30 (diff) | |
download | external_llvm-279e2c4ff68df22921298ef5a5c0f9b998c512c1.zip external_llvm-279e2c4ff68df22921298ef5a5c0f9b998c512c1.tar.gz external_llvm-279e2c4ff68df22921298ef5a5c0f9b998c512c1.tar.bz2 |
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 737c5e6..49b243b 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 |