This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFC] Remove dead code that is supposed to handle invalid command options
ClosedPublic

Authored by teemperor on Aug 21 2019, 3:18 AM.

Details

Summary

We currently have a bunch of code that is supposed to handle invalid command options, but
all this code is unreachable because invalid options are already handled in Options::Parse.
The only way we can reach this code is when we declare but then not implement an option
(which will be made impossible with D65386, which is also when we can completely remove
the default cases).

This patch replaces all this code with llvm_unreachable to make clear this is dead code
that can't be reached.

Diff Detail

Event Timeline

teemperor created this revision.Aug 21 2019, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2019, 3:18 AM
teemperor updated this revision to Diff 216385.Aug 21 2019, 6:40 AM
  • Remove some unreachable that are not in the command/interpreter directory (as they might be used differently and could be reached).
JDevlieghere accepted this revision.Aug 21 2019, 9:28 AM
This revision is now accepted and ready to land.Aug 21 2019, 9:28 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2019, 1:12 AM