Rename Instruction::dropUnknownMetadata() to dropUnknownNonDebugMetadata()
[oota-llvm.git] / lib / IR / Metadata.cpp
index 08fa7ce3b0525ee7954c13f06c59b5345eb00479..b1545554deb567917e68ca8048db75d9c6d9dbb8 100644 (file)
@@ -1057,14 +1057,10 @@ MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
   return getMetadataImpl(getContext().getMDKindID(Kind));
 }
 
-void Instruction::dropUnknownMetadata(ArrayRef<unsigned> KnownIDs) {
+void Instruction::dropUnknownNonDebugMetadata(ArrayRef<unsigned> KnownIDs) {
   SmallSet<unsigned, 5> KnownSet;
   KnownSet.insert(KnownIDs.begin(), KnownIDs.end());
 
-  // Drop debug if needed
-  if (!KnownSet.erase(LLVMContext::MD_dbg))
-    DbgLoc = DebugLoc();
-
   if (!hasMetadataHashEntry())
     return; // Nothing to remove!