[Lldb-commits] [PATCH] D66522: [lldb][NFC] Remove dead code that is supposed to handle invalid command options
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 21 03:23:16 PDT 2019
teemperor created this revision.
teemperor added a reviewer: JDevlieghere.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
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 <https://reviews.llvm.org/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.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D66522
Files:
lldb/source/Commands/CommandObjectBreakpoint.cpp
lldb/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectDisassemble.cpp
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Commands/CommandObjectFrame.cpp
lldb/source/Commands/CommandObjectHelp.h
lldb/source/Commands/CommandObjectLog.cpp
lldb/source/Commands/CommandObjectMemory.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectProcess.cpp
lldb/source/Commands/CommandObjectRegister.cpp
lldb/source/Commands/CommandObjectSettings.cpp
lldb/source/Commands/CommandObjectSource.cpp
lldb/source/Commands/CommandObjectTarget.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Commands/CommandObjectType.cpp
lldb/source/Commands/CommandObjectWatchpoint.cpp
lldb/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/source/Interpreter/OptionGroupArchitecture.cpp
lldb/source/Interpreter/OptionGroupFormat.cpp
lldb/source/Interpreter/OptionGroupOutputFile.cpp
lldb/source/Interpreter/OptionGroupPlatform.cpp
lldb/source/Interpreter/OptionGroupUUID.cpp
lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/source/Interpreter/OptionGroupVariable.cpp
lldb/source/Interpreter/OptionGroupWatchpoint.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66522.216363.patch
Type: text/x-patch
Size: 32560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190821/18231849/attachment-0001.bin>
More information about the lldb-commits
mailing list