summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PointerEmbeddedInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/PointerEmbeddedInt.h')
-rw-r--r--include/llvm/ADT/PointerEmbeddedInt.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/ADT/PointerEmbeddedInt.h b/include/llvm/ADT/PointerEmbeddedInt.h
index 34323b5b8af49..ab4e1048a5bc9 100644
--- a/include/llvm/ADT/PointerEmbeddedInt.h
+++ b/include/llvm/ADT/PointerEmbeddedInt.h
@@ -52,7 +52,7 @@ class PointerEmbeddedInt {
explicit RawValueTag() = default;
};
- friend class PointerLikeTypeTraits<PointerEmbeddedInt>;
+ friend struct PointerLikeTypeTraits<PointerEmbeddedInt>;
explicit PointerEmbeddedInt(uintptr_t Value, RawValueTag) : Value(Value) {}
@@ -80,10 +80,9 @@ public:
// Provide pointer like traits to support use with pointer unions and sum
// types.
template <typename IntT, int Bits>
-class PointerLikeTypeTraits<PointerEmbeddedInt<IntT, Bits>> {
+struct PointerLikeTypeTraits<PointerEmbeddedInt<IntT, Bits>> {
using T = PointerEmbeddedInt<IntT, Bits>;
-public:
static inline void *getAsVoidPointer(const T &P) {
return reinterpret_cast<void *>(P.Value);
}