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.

llvm-svn: 226509
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-19 22:21:15 +00:00
parent c5a0e2e3a7
commit 434d4a5a06
1 changed files with 4 additions and 5 deletions

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);
}