mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +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:
+1
-7
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user