llvm.org GIT mirror llvm / 7eac64c
[ADT] Unbreak PointerEmbeddedInt build with MSVC. MSVC seems to have problems looking up Value inside of the template. Not really sure whether that's a bug there or Clang and GCC being too permissive. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257288 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
2929 class PointerEmbeddedInt {
3030 uintptr_t Value;
3131
32 static_assert(Bits < sizeof(Value) * CHAR_BIT,
32 static_assert(Bits < sizeof(PointerEmbeddedInt::Value) * CHAR_BIT,
3333 "Cannot embed more bits than we have in a pointer!");
3434
3535 enum : uintptr_t {
3636 // We shift as many zeros into the value as we can while preserving the
3737 // number of bits desired for the integer.
38 Shift = sizeof(Value) * CHAR_BIT - Bits,
38 Shift = sizeof(PointerEmbeddedInt::Value) * CHAR_BIT - Bits,
3939
4040 // We also want to be able to mask out the preserved bits for asserts.
4141 Mask = static_cast(-1) << Bits