[llvm] r226509 - IR: Remove templates from TempMDNodeDeleter, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jan 19 14:21:15 PST 2015
Author: dexonsmith
Date: Mon Jan 19 16:21:15 2015
New Revision: 226509
URL: http://llvm.org/viewvc/llvm-project?rev=226509&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/IR/Metadata.h
Modified: llvm/trunk/include/llvm/IR/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Metadata.h?rev=226509&r1=226508&r2=226509&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Metadata.h (original)
+++ llvm/trunk/include/llvm/IR/Metadata.h Mon Jan 19 16:21:15 2015
@@ -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(LLVMCon
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);
}
More information about the llvm-commits
mailing list