mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Assert that we aren't erasing a block argument that has uses.
This fires in a bug I am investigating.
This commit is contained in:
@@ -141,6 +141,8 @@ SILArgument *SILBasicBlock::insertBBArg(bbarg_iterator Iter, SILType Ty,
|
||||
}
|
||||
|
||||
void SILBasicBlock::eraseBBArg(int Index) {
|
||||
assert(getBBArg(Index)->use_empty() &&
|
||||
"Erasing block argument that has uses!");
|
||||
// Notify the delete handlers that this BB argument is going away.
|
||||
getModule().notifyDeleteHandlers(getBBArg(Index));
|
||||
BBArgList.erase(BBArgList.begin() + Index);
|
||||
|
||||
Reference in New Issue
Block a user