IR: Remove templates from TempMDNodeDeleter, NFC

r226504 added `TempMDNodeDeleter` to help with `std::unique_ptr<>`-izing
the `MDNode::getTemporary()` interface.  It doesn't need to be
templated, though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226509 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-19 22:21:15 +00:00
parent 0927997ce8
commit 65bb48b6fc

View File

@ -651,13 +651,12 @@ public:
}
};
template <class T>
struct TempMDNodeDeleter {
inline void operator()(T *Node) const;
inline void operator()(MDNode *Node) const;
};
#define HANDLE_UNIQUABLE_LEAF(CLASS) \
typedef std::unique_ptr<CLASS, TempMDNodeDeleter<CLASS>> Temp##CLASS;
typedef std::unique_ptr<CLASS, TempMDNodeDeleter> Temp##CLASS;
#include "llvm/IR/Metadata.def"
//===----------------------------------------------------------------------===//
@ -921,8 +920,8 @@ TempMDTuple MDNode::getTemporary(LLVMContext &Context,
ArrayRef<Metadata *> MDs) {
return MDTuple::getTemporary(Context, MDs);
}
template <class T>
void TempMDNodeDeleter<T>::operator()(T *Node) const {
void TempMDNodeDeleter::operator()(MDNode *Node) const {
MDNode::deleteTemporary(Node);
}