This is an archive of the discontinued LLVM Phabricator instance.

[ShrinkWrap] Fix FindIDom to only have one kind of failure
ClosedPublic

Authored by mkuper on Jan 3 2016, 2:15 AM.

Details

Summary

FindIDom could fail in two different ways - it could return either nullptr or the block itself, depending on the circumstances.
Some users checked one error condition, while others checked the other.

Make it always return nullptr on failure.
This fixes PR26004.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 43855.Jan 3 2016, 2:15 AM
mkuper retitled this revision from to [ShrinkWrap] Fix FindIDom to only have one kind of failure.
mkuper updated this object.
mkuper added reviewers: qcolombet, kbarton.
mkuper added a subscriber: llvm-commits.
qcolombet edited edge metadata.Jan 4 2016, 11:04 AM

Hi Michael,

Good catch!
LGTM.

Thanks,
-Quentin

qcolombet accepted this revision.Jan 4 2016, 11:04 AM
qcolombet edited edge metadata.
This revision is now accepted and ready to land.Jan 4 2016, 11:04 AM
This revision was automatically updated to reflect the committed changes.