diff --git a/llvm/include/llvm/IR/Instruction.h b/llvm/include/llvm/IR/Instruction.h index e408bcbbf9d7..fd7c54d69b63 100644 --- a/llvm/include/llvm/IR/Instruction.h +++ b/llvm/include/llvm/IR/Instruction.h @@ -599,21 +599,6 @@ private: Instruction *cloneImpl() const; }; -// Instruction* is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { - typedef Instruction* PT; - -public: - static inline void *getAsVoidPointer(PT P) { return P; } - - static inline PT getFromVoidPointer(void *P) { - return static_cast(P); - } - - enum { NumLowBitsAvailable = 2 }; -}; - } // end namespace llvm #endif // LLVM_IR_INSTRUCTION_H diff --git a/llvm/include/llvm/IR/Use.h b/llvm/include/llvm/IR/Use.h index f1c3cbbf4c86..ff6b2e1f1e22 100644 --- a/llvm/include/llvm/IR/Use.h +++ b/llvm/include/llvm/IR/Use.h @@ -36,18 +36,6 @@ class User; class Use; template struct simplify_type; -// Use** is only 4-byte aligned. -template <> class PointerLikeTypeTraits { -public: - static inline void *getAsVoidPointer(Use **P) { return P; } - - static inline Use **getFromVoidPointer(void *P) { - return static_cast(P); - } - - enum { NumLowBitsAvailable = 2 }; -}; - /// \brief A Use represents the edge between a Value definition and its users. /// /// This is notionally a two-dimensional linked list. It supports traversing diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h index 94dd6a4f34bd..ac37a45a86be 100644 --- a/llvm/include/llvm/IR/Value.h +++ b/llvm/include/llvm/IR/Value.h @@ -793,21 +793,6 @@ template <> struct isa_impl { } }; -// Value* is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { - typedef Value* PT; - -public: - static inline void *getAsVoidPointer(PT P) { return P; } - - static inline PT getFromVoidPointer(void *P) { - return static_cast(P); - } - - enum { NumLowBitsAvailable = 2 }; -}; - // Create wrappers for C Binding types (see CBindingWrapping.h). DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef) diff --git a/llvm/include/llvm/IR/ValueHandle.h b/llvm/include/llvm/IR/ValueHandle.h index 3c2805913ef5..a4d4893a9bc9 100644 --- a/llvm/include/llvm/IR/ValueHandle.h +++ b/llvm/include/llvm/IR/ValueHandle.h @@ -22,17 +22,6 @@ namespace llvm { class ValueHandleBase; template struct simplify_type; -// ValueHandleBase** is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { -public: - static inline void *getAsVoidPointer(ValueHandleBase** P) { return P; } - static inline ValueHandleBase **getFromVoidPointer(void *P) { - return static_cast(P); - } - enum { NumLowBitsAvailable = 2 }; -}; - /// \brief This is the common base class of value handles. /// /// ValueHandle's are smart pointers to Value's that have special behavior when