[llvm] r296301 - [APInt] Use UINT64_MAX instead of ~uint64_t(0ULL). NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 26 13:15:18 PST 2017
Author: ctopper
Date: Sun Feb 26 15:15:18 2017
New Revision: 296301
URL: http://llvm.org/viewvc/llvm-project?rev=296301&view=rev
Log:
[APInt] Use UINT64_MAX instead of ~uint64_t(0ULL). NFC
Modified:
llvm/trunk/include/llvm/ADT/APInt.h
Modified: llvm/trunk/include/llvm/ADT/APInt.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=296301&r1=296300&r2=296301&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APInt.h (original)
+++ llvm/trunk/include/llvm/ADT/APInt.h Sun Feb 26 15:15:18 2017
@@ -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
More information about the llvm-commits
mailing list