summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Metadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 22:47:08 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 22:47:08 +0000
commit6cf10d27864292722af5886fa1d479cec33ec9c5 (patch)
tree3678d10e610107e1f108c28bc874e45f61f74f12 /llvm/lib/IR/Metadata.cpp
parent660c0893da5a446492a322cb6bed9c5c119434fb (diff)
downloadbcm5719-llvm-6cf10d27864292722af5886fa1d479cec33ec9c5.tar.gz
bcm5719-llvm-6cf10d27864292722af5886fa1d479cec33ec9c5.zip
IR: Simplify erasing from uniquing store, NFC
llvm-svn: 226517
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r--llvm/lib/IR/Metadata.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 822a9f5237c..5f327fad06a 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -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();
OpenPOWER on IntegriCloud