diff --git a/include/llvm/Support/PointerLikeTypeTraits.h b/include/llvm/Support/PointerLikeTypeTraits.h index c12d237b279..96cdaed142c 100644 --- a/include/llvm/Support/PointerLikeTypeTraits.h +++ b/include/llvm/Support/PointerLikeTypeTraits.h @@ -37,7 +37,8 @@ template <> struct ConstantLog2<1> : std::integral_constant {}; } // Provide PointerLikeTypeTraits for non-cvr pointers. -template struct PointerLikeTypeTraits { +template class PointerLikeTypeTraits { +public: static inline void *getAsVoidPointer(T *P) { return P; } static inline T *getFromVoidPointer(void *P) { return static_cast(P); } @@ -46,7 +47,8 @@ template struct PointerLikeTypeTraits { }; }; -template <> struct PointerLikeTypeTraits { +template <> class PointerLikeTypeTraits { +public: static inline void *getAsVoidPointer(void *P) { return P; } static inline void *getFromVoidPointer(void *P) { return P; }