This is an archive of the discontinued LLVM Phabricator instance.

[Local] Handle terminators with users in removeUnreachableBlocks.
ClosedPublic

Authored by fhahn on Oct 2 2019, 3:12 AM.

Details

Summary

Terminators like invoke can have users outside the current basic block.
We have to replace those users with undef, before replacing the
terminator.

This fixes a crash exposed by rL373430.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Oct 2 2019, 3:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2019, 3:12 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
fhahn updated this revision to Diff 222792.Oct 2 2019, 3:15 AM

clang-format-diff

asbirlea accepted this revision.Oct 2 2019, 10:10 AM

Thank you for this!
LGTM.

This revision is now accepted and ready to land.Oct 2 2019, 10:10 AM
This revision was automatically updated to reflect the committed changes.