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/CommandObjectWatchpointCommand.cpp | |
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/CommandObjectWatchpointCommand.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectWatchpointCommand.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp index 5399f46cd11..e0a3bb88325 100644 --- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp @@ -354,7 +354,7 @@ are no syntax errors may indicate that a function was declared but never called. break; default: - break; + llvm_unreachable("Unimplemented option"); } return error; } |