Verify that a non-uniqued non-temporary MDNode is not deleted via

MDNode::deleteTemporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111853 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-08-23 22:32:05 +00:00
parent 8300712c1e
commit 97cfa7dc0a

View File

@ -258,7 +258,9 @@ MDNode *MDNode::getTemporary(LLVMContext &Context, Value *const *Vals,
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 &&