diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h index 5bd14c6173a9..8781d1803ac7 100644 --- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h +++ b/llvm/include/llvm/ADT/PointerEmbeddedInt.h @@ -30,13 +30,13 @@ template class PointerEmbeddedInt { uintptr_t Value; - static_assert(Bits < sizeof(PointerEmbeddedInt::Value) * CHAR_BIT, + static_assert(Bits < sizeof(uintptr_t) * CHAR_BIT, "Cannot embed more bits than we have in a pointer!"); enum : uintptr_t { // We shift as many zeros into the value as we can while preserving the // number of bits desired for the integer. - Shift = sizeof(PointerEmbeddedInt::Value) * CHAR_BIT - Bits, + Shift = sizeof(uintptr_t) * CHAR_BIT - Bits, // We also want to be able to mask out the preserved bits for asserts. Mask = static_cast(-1) << Bits