aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/ValueHandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/ValueHandle.h')
-rw-r--r--include/llvm/Support/ValueHandle.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Support/ValueHandle.h b/include/llvm/Support/ValueHandle.h
index 2771464..a668656 100644
--- a/include/llvm/Support/ValueHandle.h
+++ b/include/llvm/Support/ValueHandle.h
@@ -18,6 +18,18 @@
#include "llvm/Value.h"
namespace llvm {
+class ValueHandleBase;
+
+// ValueHandleBase** is only 4-byte aligned.
+template<>
+class PointerLikeTypeTraits<ValueHandleBase**> {
+public:
+ static inline void *getAsVoidPointer(ValueHandleBase** P) { return P; }
+ static inline ValueHandleBase **getFromVoidPointer(void *P) {
+ return static_cast<ValueHandleBase**>(P);
+ }
+ enum { NumLowBitsAvailable = 2 };
+};
/// ValueHandleBase - This is the common base class of value handles.
/// ValueHandle's are smart pointers to Value's that have special behavior when