mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-03 11:08:32 +00:00
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:
parent
05111848a0
commit
668bd8ccfe
@ -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();
|
||||
};
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user