mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-17 18:31:04 +00:00
Add an assert to MDNode::deleteTemporary check that the node being deleted
is not non-temporary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8bef744518
commit
990bdd50d1
@ -257,10 +257,12 @@ 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!");
|
||||
assert((N->getSubclassDataFromValue() & NotUniquedBit) &&
|
||||
"Temporary MDNode does not have NotUniquedBit set!");
|
||||
assert((N->getSubclassDataFromValue() & DestroyFlag) == 0 &&
|
||||
"Temporary MDNode does has DestroyFlag set!");
|
||||
"Temporary MDNode has DestroyFlag set!");
|
||||
N->setValueSubclassData(N->getSubclassDataFromValue() |
|
||||
DestroyFlag);
|
||||
LeakDetector::removeGarbageObject(N);
|
||||
|
Loading…
Reference in New Issue
Block a user