diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-08-22 08:08:05 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-08-22 08:08:05 +0000 |
commit | 36162014c4697c30af588197d7cdeb8d2930abbf (patch) | |
tree | 48d8af920c8b27c9d20c12400ae1eb62c4ff830f /lldb/source/Commands/CommandObjectHelp.h | |
parent | ae34ed2c0d2fba36d8363ba7fffc1dbe18878335 (diff) | |
download | bcm5719-llvm-36162014c4697c30af588197d7cdeb8d2930abbf.tar.gz bcm5719-llvm-36162014c4697c30af588197d7cdeb8d2930abbf.zip |
[lldb][NFC] Remove dead code that is supposed to handle invalid command options
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.
Reviewers: JDevlieghere
Reviewed By: JDevlieghere
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D66522
llvm-svn: 369625
Diffstat (limited to 'lldb/source/Commands/CommandObjectHelp.h')
-rw-r--r-- | lldb/source/Commands/CommandObjectHelp.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectHelp.h b/lldb/source/Commands/CommandObjectHelp.h index 826cd1e18a8..52a00ac79ff 100644 --- a/lldb/source/Commands/CommandObjectHelp.h +++ b/lldb/source/Commands/CommandObjectHelp.h @@ -52,9 +52,7 @@ public: m_show_hidden = true; break; default: - error.SetErrorStringWithFormat("unrecognized option '%c'", - short_option); - break; + llvm_unreachable("Unimplemented option"); } return error; |