diff options
Diffstat (limited to 'llvm/include/llvm/Use.h')
-rw-r--r-- | llvm/include/llvm/Use.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/include/llvm/Use.h b/llvm/include/llvm/Use.h index 32cdd1b95dd..53df699e703 100644 --- a/llvm/include/llvm/Use.h +++ b/llvm/include/llvm/Use.h @@ -29,6 +29,17 @@ class Use; /// Tag - generic tag type for (at least 32 bit) pointers enum Tag { noTag, tagOne, tagTwo, tagThree }; +// Use** is only 4-byte aligned. +template<> +class PointerLikeTypeTraits<Use**> { +public: + static inline void *getAsVoidPointer(Use** P) { return P; } + static inline Use **getFromVoidPointer(void *P) { + return static_cast<Use**>(P); + } + enum { NumLowBitsAvailable = 2 }; +}; + //===----------------------------------------------------------------------===// // Use Class //===----------------------------------------------------------------------===// |