diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 1818a11a9da..47af22884dd 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -30,14 +30,16 @@ class PointerLikeTypeInfo { // Provide PointerLikeTypeInfo for all pointers. template -struct PointerLikeTypeInfo { +class PointerLikeTypeInfo { +public: static inline void *getAsVoidPointer(T* P) { return P; } static inline T *getFromVoidPointer(void *P) { return static_cast(P); } }; template -struct PointerLikeTypeInfo { +class PointerLikeTypeInfo { +public: static inline const void *getAsVoidPointer(const T* P) { return P; } static inline const T *getFromVoidPointer(const void *P) { return static_cast(P);