]> granicus.if.org Git - llvm/commitdiff
[APInt] Use UINT64_MAX instead of ~uint64_t(0ULL). NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 26 Feb 2017 21:15:18 +0000 (21:15 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 26 Feb 2017 21:15:18 +0000 (21:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296301 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/APInt.h

index ccbff7a5dafc4d77b51fa6744bc38b3bd0b5f8d2..d64a05165bd5961d40365a20f9ebc14478f5208e 100644 (file)
@@ -147,7 +147,7 @@ class LLVM_NODISCARD APInt {
       return *this;
 
     // Mask out the high bits.
-    uint64_t mask = ~uint64_t(0ULL) >> (APINT_BITS_PER_WORD - wordBits);
+    uint64_t mask = UINT64_MAX >> (APINT_BITS_PER_WORD - wordBits);
     if (isSingleWord())
       VAL &= mask;
     else