Page MenuHomePhabricator

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

Authored by teemperor on Wed, Aug 21, 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

Repository
rL LLVM

Event Timeline

teemperor created this revision.Wed, Aug 21, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptWed, Aug 21, 3:18 AM
teemperor updated this revision to Diff 216385.Wed, Aug 21, 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.Wed, Aug 21, 9:28 AM
This revision is now accepted and ready to land.Wed, Aug 21, 9:28 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptThu, Aug 22, 1:12 AM