summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:11:32 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-12 20:11:32 +0000
commit3c94844a484be14145d2ff7974cf620d0fc58be5 (patch)
tree45ad5e0ae381ff751ac0e4928ead7f50d39bc818
parent118632dbf6851afc878098903a5baf7c8851d3c2 (diff)
downloadbcm5719-llvm-3c94844a484be14145d2ff7974cf620d0fc58be5.tar.gz
bcm5719-llvm-3c94844a484be14145d2ff7974cf620d0fc58be5.zip
IR: Push storeDistinctInContext() down to UniquableMDNode, NFC
llvm-svn: 225683
-rw-r--r--llvm/include/llvm/IR/Metadata.h3
-rw-r--r--llvm/lib/IR/Metadata.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h
index dbf16408fc0..e0363af57a7 100644
--- a/llvm/include/llvm/IR/Metadata.h
+++ b/llvm/include/llvm/IR/Metadata.h
@@ -603,7 +603,6 @@ protected:
~MDNode() {}
void dropAllReferences();
- void storeDistinctInContext();
static MDNode *getMDNode(LLVMContext &C, ArrayRef<Metadata *> MDs,
bool Insert = true);
@@ -735,6 +734,8 @@ protected:
bool AllowRAUW);
~UniquableMDNode();
+ void storeDistinctInContext();
+
public:
static bool classof(const Metadata *MD) {
return MD->getMetadataID() == MDTupleKind;
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp
index 282ea49aa41..8ff46735757 100644
--- a/llvm/lib/IR/Metadata.cpp
+++ b/llvm/lib/IR/Metadata.cpp
@@ -616,7 +616,7 @@ void MDNode::deleteTemporary(MDNode *N) {
delete cast<MDNodeFwdDecl>(N);
}
-void MDNode::storeDistinctInContext() {
+void UniquableMDNode::storeDistinctInContext() {
assert(!IsDistinctInContext && "Expected newly distinct metadata");
IsDistinctInContext = true;
auto *T = cast<MDTuple>(this);
OpenPOWER on IntegriCloud