mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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:
parent
0927997ce8
commit
65bb48b6fc
@ -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
Block a user