This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [MainLoop] Remove redundant termination clause (NFCI)
ClosedPublic

Authored by mgorny on Feb 14 2019, 2:54 AM.

Details

Summary

Remove the redundant termination clause from within the loop. Since
the check is done at the end of the loop, it's entirely redundant
to the 'while' condition. If termination was requested, the latter
will become false and the 'while' loop will terminate, resulting
in the 'return' statement below the loop being executed (which is
equivalent to the one used inside 'if').

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Feb 14 2019, 2:54 AM

It looks good to me.

labath accepted this revision.Feb 14 2019, 8:49 AM

That sounds correct. The extra check must have crept in because of all the refactors this class has gone through to support all possible event handling mechanisms...

This revision is now accepted and ready to land.Feb 14 2019, 8:49 AM
krytarowski accepted this revision.Feb 14 2019, 10:26 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2019, 10:51 AM