You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate BasicBlock.delete() with a stern warning
Removing blocks from the CFG is not as easy as it might appear at
first. Incorrect deletion of a block can cause dangling references to
appear in the function which show up as bad accesses when deallocation
of the parent function occurs.
The safest way to remove a Basic Block is to first make sure that it is
freshly inserted. Next, walk its instructions and, in turn, their uses
and overwrite those uses with undef. Next, remove those instructions
from the basic block one by one. Finally, call removeFromParent(). Do
not attempt to delete() the block, the containing function will handle
that when it goes to destroy the module.
0 commit comments