Add an assert to MDNode::deleteTemporary check that the node being deleted
[oota-llvm.git] / lib / VMCore / Instruction.cpp
index 9792adaaa122d889c26fa7a6d7677396bc1b9ca3..05bed4c64316fa77e406ec96153c6ccd0c700bd0 100644 (file)
@@ -49,8 +49,8 @@ Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps,
 // Out of line virtual method, so the vtable, etc has a home.
 Instruction::~Instruction() {
   assert(Parent == 0 && "Instruction still linked in the program!");
-  if (hasMetadata())
-    removeAllMetadata();
+  if (hasMetadataHashEntry())
+    clearMetadataHashEntries();
 }