llvm-project
285009f2 - [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (#124288)

Commit
245 days ago
[NFC][DebugInfo] Rewrite more call-sites to insert with iterators (#124288) As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. The call-sites updated in this patch are those where the dyn_cast_or_null cast utility doesn't compose well with iterator insertion. It can distinguish between nullptr and a "present" (non-null) Instruction pointer, but not between a legal and illegal instruction iterator. This can lead to end-iterator dereferences and thus crashes. We can improve this in the future (as parent-pointers can now be accessed from ilist nodes), but for the moment, add explicit tests for end() iterators at the five call sites affected by this.
Author
Committer
Parents
Loading