Remove an entry from ValueMap before removing elements.

llvm-svn: 80247
This commit is contained in:
Devang Patel 2009-08-27 15:32:38 +00:00
parent e17a92c545
commit 0ac8889288

View File

@ -101,8 +101,8 @@ static std::vector<Value*> getValType(MDNode *N) {
}
MDNode::~MDNode() {
dropAllReferences();
getType()->getContext().pImpl->MDNodes.remove(this);
dropAllReferences();
}
//===----------------------------------------------------------------------===//