forked from OSchip/llvm-project
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:
parent
c5a0e2e3a7
commit
434d4a5a06
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue