diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h index 546597f4577a..2279d43405fa 100644 --- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h +++ b/llvm/include/llvm/ADT/PointerEmbeddedInt.h @@ -45,7 +45,9 @@ class PointerEmbeddedInt { Mask = static_cast(-1) << Bits }; - static constexpr const struct RawValueTag {} RawValue = RawValueTag(); + struct RawValueTag { + explicit RawValueTag() = default; + }; friend class PointerLikeTypeTraits; @@ -86,10 +88,10 @@ public: return reinterpret_cast(P.Value); } static inline T getFromVoidPointer(void *P) { - return T(reinterpret_cast(P), T::RawValue); + return T(reinterpret_cast(P), typename T::RawValueTag()); } static inline T getFromVoidPointer(const void *P) { - return T(reinterpret_cast(P), T::RawValue); + return T(reinterpret_cast(P), typename T::RawValueTag()); } enum { NumLowBitsAvailable = T::Shift };