summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PointerEmbeddedInt.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
commit044eb2f6afba375a914ac9d8024f8f5142bb912e (patch)
tree1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/ADT/PointerEmbeddedInt.h
parenteb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff)
Notes
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);
}