[llvm-commits] [llvm] r111853 - /llvm/trunk/lib/VMCore/Metadata.cpp
Dan Gohman
gohman at apple.com
Mon Aug 23 15:32:06 PDT 2010
Author: djg
Date: Mon Aug 23 17:32:05 2010
New Revision: 111853
URL: http://llvm.org/viewvc/llvm-project?rev=111853&view=rev
Log:
Verify that a non-uniqued non-temporary MDNode is not deleted via
MDNode::deleteTemporary.
Modified:
llvm/trunk/lib/VMCore/Metadata.cpp
Modified: llvm/trunk/lib/VMCore/Metadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Metadata.cpp?rev=111853&r1=111852&r2=111853&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Metadata.cpp (original)
+++ llvm/trunk/lib/VMCore/Metadata.cpp Mon Aug 23 17:32:05 2010
@@ -258,7 +258,9 @@
void MDNode::deleteTemporary(MDNode *N) {
assert(N->use_empty() && "Temporary MDNode has uses!");
assert(!N->getContext().pImpl->MDNodeSet.RemoveNode(N) &&
- "Deleting a non-temporary node!");
+ "Deleting a non-temporary uniqued node!");
+ assert(!N->getContext().pImpl->NonUniquedMDNodes.erase(N) &&
+ "Deleting a non-temporary non-uniqued node!");
assert((N->getSubclassDataFromValue() & NotUniquedBit) &&
"Temporary MDNode does not have NotUniquedBit set!");
assert((N->getSubclassDataFromValue() & DestroyFlag) == 0 &&
More information about the llvm-commits
mailing list