]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
IR: Push storeDistinctInContext() down to UniquableMDNode, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 20:11:32 +0000 (20:11 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 20:11:32 +0000 (20:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225683 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/Metadata.h
lib/IR/Metadata.cpp

index dbf16408fc06321313ad87acd1b820cd58b999ae..e0363af57a784e28657632b73a8d0e42b329ea75 100644 (file)
@@ -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;
index 282ea49aa417a47f4ef4f4a6027dbb039893149c..8ff46735757750f3f375964ca80021c61b38cc03 100644 (file)
@@ -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);