diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-12 20:11:32 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-12 20:11:32 +0000 |
| commit | 3c94844a484be14145d2ff7974cf620d0fc58be5 (patch) | |
| tree | 45ad5e0ae381ff751ac0e4928ead7f50d39bc818 | |
| parent | 118632dbf6851afc878098903a5baf7c8851d3c2 (diff) | |
| download | bcm5719-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.h | 3 | ||||
| -rw-r--r-- | llvm/lib/IR/Metadata.cpp | 2 |
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); |

