IR: Simplify erasing from uniquing store, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-19 22:47:08 +00:00
parent 05111848a0
commit 668bd8ccfe
2 changed files with 1 additions and 9 deletions

View File

@ -959,7 +959,6 @@ public:
private:
MDTuple *uniquifyImpl();
void eraseFromStoreImpl();
};
MDTuple *MDNode::get(LLVMContext &Context, ArrayRef<Metadata *> MDs) {
@ -1037,7 +1036,6 @@ public:
private:
MDLocation *uniquifyImpl();
void eraseFromStoreImpl();
};
//===----------------------------------------------------------------------===//

View File

@ -631,7 +631,7 @@ void UniquableMDNode::eraseFromStore() {
llvm_unreachable("Invalid subclass of UniquableMDNode");
#define HANDLE_UNIQUABLE_LEAF(CLASS) \
case CLASS##Kind: \
cast<CLASS>(this)->eraseFromStoreImpl(); \
getContext().pImpl->CLASS##s.erase(cast<CLASS>(this)); \
break;
#include "llvm/IR/Metadata.def"
}
@ -687,8 +687,6 @@ MDTuple *MDTuple::uniquifyImpl() {
return this;
}
void MDTuple::eraseFromStoreImpl() { getContext().pImpl->MDTuples.erase(this); }
MDLocation::MDLocation(LLVMContext &C, StorageType Storage, unsigned Line,
unsigned Column, ArrayRef<Metadata *> MDs)
: UniquableMDNode(C, MDLocationKind, Storage, MDs) {
@ -752,10 +750,6 @@ MDLocation *MDLocation::uniquifyImpl() {
return this;
}
void MDLocation::eraseFromStoreImpl() {
getContext().pImpl->MDLocations.erase(this);
}
void MDNode::deleteTemporary(MDNode *N) {
assert(N->isTemporary() && "Expected temporary node");
cast<UniquableMDNode>(N)->deleteAsSubclass();