mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +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:
@@ -959,7 +959,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MDTuple *uniquifyImpl();
|
MDTuple *uniquifyImpl();
|
||||||
void eraseFromStoreImpl();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MDTuple *MDNode::get(LLVMContext &Context, ArrayRef<Metadata *> MDs) {
|
MDTuple *MDNode::get(LLVMContext &Context, ArrayRef<Metadata *> MDs) {
|
||||||
@@ -1037,7 +1036,6 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
MDLocation *uniquifyImpl();
|
MDLocation *uniquifyImpl();
|
||||||
void eraseFromStoreImpl();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
@@ -631,7 +631,7 @@ void UniquableMDNode::eraseFromStore() {
|
|||||||
llvm_unreachable("Invalid subclass of UniquableMDNode");
|
llvm_unreachable("Invalid subclass of UniquableMDNode");
|
||||||
#define HANDLE_UNIQUABLE_LEAF(CLASS) \
|
#define HANDLE_UNIQUABLE_LEAF(CLASS) \
|
||||||
case CLASS##Kind: \
|
case CLASS##Kind: \
|
||||||
cast<CLASS>(this)->eraseFromStoreImpl(); \
|
getContext().pImpl->CLASS##s.erase(cast<CLASS>(this)); \
|
||||||
break;
|
break;
|
||||||
#include "llvm/IR/Metadata.def"
|
#include "llvm/IR/Metadata.def"
|
||||||
}
|
}
|
||||||
@@ -687,8 +687,6 @@ MDTuple *MDTuple::uniquifyImpl() {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDTuple::eraseFromStoreImpl() { getContext().pImpl->MDTuples.erase(this); }
|
|
||||||
|
|
||||||
MDLocation::MDLocation(LLVMContext &C, StorageType Storage, unsigned Line,
|
MDLocation::MDLocation(LLVMContext &C, StorageType Storage, unsigned Line,
|
||||||
unsigned Column, ArrayRef<Metadata *> MDs)
|
unsigned Column, ArrayRef<Metadata *> MDs)
|
||||||
: UniquableMDNode(C, MDLocationKind, Storage, MDs) {
|
: UniquableMDNode(C, MDLocationKind, Storage, MDs) {
|
||||||
@@ -752,10 +750,6 @@ MDLocation *MDLocation::uniquifyImpl() {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MDLocation::eraseFromStoreImpl() {
|
|
||||||
getContext().pImpl->MDLocations.erase(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MDNode::deleteTemporary(MDNode *N) {
|
void MDNode::deleteTemporary(MDNode *N) {
|
||||||
assert(N->isTemporary() && "Expected temporary node");
|
assert(N->isTemporary() && "Expected temporary node");
|
||||||
cast<UniquableMDNode>(N)->deleteAsSubclass();
|
cast<UniquableMDNode>(N)->deleteAsSubclass();
|
||||||
|
Reference in New Issue
Block a user