mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Track in-use iterators and update them both when instructions are
deleted and when they are added.
Safe iteration in the presence of arbitrary changes now looks like
this:
for (SILInstruction *inst : deleter.updatingRange(&bb)) {
modify(inst);
}
2.8 KiB
2.8 KiB