[llvm-commits] [llvm] r92254 - in /llvm/trunk: include/llvm/Metadata.h lib/VMCore/Metadata.cpp

Chris Lattner sabre at nondot.org
Mon Dec 28 23:50:09 PST 2009


Author: lattner
Date: Tue Dec 29 01:50:09 2009
New Revision: 92254

URL: http://llvm.org/viewvc/llvm-project?rev=92254&view=rev
Log:
the only call to this function (from clang) has been removed, zap it.

Modified:
    llvm/trunk/include/llvm/Metadata.h
    llvm/trunk/lib/VMCore/Metadata.cpp

Modified: llvm/trunk/include/llvm/Metadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Metadata.h?rev=92254&r1=92253&r2=92254&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Metadata.h (original)
+++ llvm/trunk/include/llvm/Metadata.h Tue Dec 29 01:50:09 2009
@@ -224,10 +224,6 @@
   /// isValidName - Return true if Name is a valid custom metadata handler name.
   static bool isValidName(StringRef Name);
 
-  /// copyMD - If metadata is attached with Instruction In1 then attach
-  /// the same metadata to In2.
-  void copyMD(Instruction *In1, Instruction *In2);
-
   /// getMDKindNames - Populate client supplied SmallVector with the name for
   /// each custom metadata ID.   ID #0 is not used, so it is filled in as empty.
   void getMDKindNames(SmallVectorImpl<StringRef> &) const;

Modified: llvm/trunk/lib/VMCore/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=92254&r1=92253&r2=92254&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Metadata.cpp (original)
+++ llvm/trunk/lib/VMCore/Metadata.cpp Tue Dec 29 01:50:09 2009
@@ -275,10 +275,6 @@
 
   /// removeAllMetadata - Remove all metadata attached to an instruction.
   void removeAllMetadata(Instruction *Inst);
-  
-  /// copyMD - If metadata is attached with Instruction In1 then attach
-  /// the same metadata to In2.
-  void copyMD(Instruction *In1, Instruction *In2);
 };
 }
 
@@ -387,18 +383,6 @@
 }
 
 
-/// copyMD - If metadata is attached with Instruction In1 then attach
-/// the same metadata to In2.
-void MetadataContextImpl::copyMD(Instruction *In1, Instruction *In2) {
-  assert(In1 && In2 && "Invalid instruction!");
-  MDMapTy &In1Info = MetadataStore[In1];
-  if (In1Info.empty())
-    return;
-  
-  for (MDMapTy::iterator I = In1Info.begin(), E = In1Info.end(); I != E; ++I)
-    In2->setMetadata(I->first, I->second);
-}
-
 //===----------------------------------------------------------------------===//
 // MetadataContext implementation.
 //
@@ -426,12 +410,6 @@
   return pImpl->getMDKindID(Name);
 }
 
-/// copyMD - If metadata is attached with Instruction In1 then attach
-/// the same metadata to In2.
-void MetadataContext::copyMD(Instruction *In1, Instruction *In2) {
-  pImpl->copyMD(In1, In2);
-}
-
 /// getHandlerNames - Populate client supplied smallvector using custome
 /// metadata name and ID.
 void MetadataContext::getMDKindNames(SmallVectorImpl<StringRef> &N) const {





More information about the llvm-commits mailing list