[Lldb-commits] [lldb] r369625 - [lldb][NFC] Remove dead code that is supposed to handle invalid command options
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 22 01:08:05 PDT 2019
Author: teemperor
Date: Thu Aug 22 01:08:05 2019
New Revision: 369625
URL: http://llvm.org/viewvc/llvm-project?rev=369625&view=rev
Log:
[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
Modified:
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectHelp.h
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Thu Aug 22 01:08:05 2019
@@ -141,9 +141,7 @@ public:
}
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -206,9 +204,7 @@ public:
m_use_dummy = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -486,9 +482,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1208,9 +1202,7 @@ public:
m_internal = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1342,9 +1334,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1496,9 +1486,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1643,9 +1631,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1713,7 +1699,8 @@ public:
"invalid boolean value '%s' passed for -L option",
option_arg.str().c_str());
} break;
-
+ default:
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -2175,9 +2162,7 @@ public:
break;
}
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -2293,9 +2278,7 @@ public:
m_append = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Thu Aug 22 01:08:05 2019
@@ -324,7 +324,7 @@ are no syntax errors may indicate that a
break;
default:
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -516,9 +516,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Thu Aug 22 01:08:05 2019
@@ -85,9 +85,7 @@ protected:
m_clear.SetOptionWasSet();
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -253,9 +251,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -370,9 +366,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1161,9 +1155,7 @@ private:
m_syntax.assign(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1414,9 +1406,7 @@ protected:
m_allow_reload = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1568,9 +1558,7 @@ protected:
option_arg.str().c_str());
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Thu Aug 22 01:08:05 2019
@@ -147,9 +147,7 @@ Status CommandObjectDisassemble::Command
} break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Thu Aug 22 01:08:05 2019
@@ -166,9 +166,7 @@ Status CommandObjectExpression::CommandO
}
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.cpp Thu Aug 22 01:08:05 2019
@@ -92,9 +92,7 @@ public:
} break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -257,9 +255,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -763,9 +759,7 @@ private:
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectHelp.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectHelp.h?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectHelp.h (original)
+++ lldb/trunk/source/Commands/CommandObjectHelp.h Thu Aug 22 01:08:05 2019
@@ -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;
Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Thu Aug 22 01:08:05 2019
@@ -113,9 +113,7 @@ public:
log_options |= LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Thu Aug 22 01:08:05 2019
@@ -96,9 +96,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -936,9 +934,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1226,9 +1222,7 @@ public:
} break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Commands/CommandObjectPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectPlatform.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectPlatform.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectPlatform.cpp Thu Aug 22 01:08:05 2019
@@ -117,8 +117,7 @@ public:
m_permissions |= lldb::eFilePermissionsWorldExecute;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -632,9 +631,7 @@ protected:
option_arg.str().c_str());
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -718,9 +715,7 @@ protected:
m_data.assign(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1270,9 +1265,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1426,9 +1419,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1587,9 +1578,7 @@ public:
timeout = std::chrono::seconds(timeout_sec);
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectProcess.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectProcess.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectProcess.cpp Thu Aug 22 01:08:05 2019
@@ -307,9 +307,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -538,9 +536,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -688,9 +684,7 @@ public:
}
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -775,9 +769,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -896,9 +888,7 @@ public:
install_path.SetFile(option_arg, FileSpec::Style::native);
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1277,9 +1267,7 @@ public:
pass = option_arg;
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Commands/CommandObjectRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectRegister.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectRegister.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectRegister.cpp Thu Aug 22 01:08:05 2019
@@ -272,9 +272,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Thu Aug 22 01:08:05 2019
@@ -104,9 +104,7 @@ insert-before or insert-after.");
m_global = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized options '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -355,9 +353,7 @@ public:
m_append = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -456,9 +452,7 @@ public:
m_filename.assign(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSource.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSource.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSource.cpp Thu Aug 22 01:08:05 2019
@@ -82,9 +82,7 @@ class CommandObjectSourceInfo : public C
modules.push_back(std::string(option_arg));
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -683,9 +681,7 @@ class CommandObjectSourceList : public C
reverse = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Thu Aug 22 01:08:05 2019
@@ -2010,9 +2010,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -3356,8 +3354,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option %c.", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -3706,6 +3703,8 @@ public:
case 'r':
m_use_regex = true;
break;
+ default:
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -4573,8 +4572,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("unrecognized option %c.", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Commands/CommandObjectThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectThread.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectThread.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectThread.cpp Thu Aug 22 01:08:05 2019
@@ -281,9 +281,7 @@ public:
"invalid boolean value for option '%c'", short_option);
} break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -485,9 +483,7 @@ public:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1037,9 +1033,7 @@ public:
}
} break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1426,7 +1420,7 @@ public:
break;
default:
- return Status("invalid short option character '%c'", short_option);
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1560,9 +1554,7 @@ public:
}
} break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1744,7 +1736,7 @@ public:
m_force = true;
break;
default:
- return Status("invalid short option character '%c'", short_option);
+ llvm_unreachable("Unimplemented option");
}
return error;
}
@@ -1866,9 +1858,7 @@ public:
m_verbose = true;
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Thu Aug 22 01:08:05 2019
@@ -323,9 +323,7 @@ private:
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -548,9 +546,7 @@ private:
m_custom_type_name.assign(option_value);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -736,9 +732,7 @@ protected:
m_language = Language::GetLanguageTypeFromString(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -867,9 +861,7 @@ private:
m_delete_all = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -987,9 +979,7 @@ class CommandObjectTypeFormatterList : p
m_category_language.SetOptionWasSet();
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1240,8 +1230,7 @@ Status CommandObjectTypeSummaryAdd::Comm
m_flags.SetHideItemNames(true);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1739,9 +1728,7 @@ class CommandObjectTypeCategoryDefine :
error = m_cate_language.SetValueFromString(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -1839,9 +1826,7 @@ class CommandObjectTypeCategoryEnable :
}
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -2008,9 +1993,7 @@ class CommandObjectTypeCategoryDisable :
}
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -2432,9 +2415,7 @@ private:
m_regex = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -2687,9 +2668,7 @@ protected:
break;
default:
- error.SetErrorStringWithFormat("invalid short option character '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Thu Aug 22 01:08:05 2019
@@ -196,9 +196,7 @@ public:
m_level = lldb::eDescriptionLevelVerbose;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -545,9 +543,7 @@ public:
option_arg.str().c_str());
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
@@ -666,9 +662,7 @@ public:
m_condition_passed = true;
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp Thu Aug 22 01:08:05 2019
@@ -354,7 +354,7 @@ are no syntax errors may indicate that a
break;
default:
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupArchitecture.cpp Thu Aug 22 01:08:05 2019
@@ -46,8 +46,7 @@ OptionGroupArchitecture::SetOptionValue(
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFormat.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupFormat.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupFormat.cpp Thu Aug 22 01:08:05 2019
@@ -160,8 +160,7 @@ Status OptionGroupFormat::SetOptionValue
} break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupOutputFile.cpp Thu Aug 22 01:08:05 2019
@@ -50,8 +50,7 @@ OptionGroupOutputFile::SetOptionValue(ui
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupPlatform.cpp Thu Aug 22 01:08:05 2019
@@ -113,8 +113,7 @@ OptionGroupPlatform::SetOptionValue(uint
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
}
Modified: lldb/trunk/source/Interpreter/OptionGroupUUID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupUUID.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupUUID.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupUUID.cpp Thu Aug 22 01:08:05 2019
@@ -40,8 +40,7 @@ Status OptionGroupUUID::SetOptionValue(u
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupValueObjectDisplay.cpp Thu Aug 22 01:08:05 2019
@@ -152,8 +152,7 @@ Status OptionGroupValueObjectDisplay::Se
break;
default:
- error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Thu Aug 22 01:08:05 2019
@@ -109,9 +109,7 @@ OptionGroupVariable::SetOptionValue(uint
error = summary_string.SetCurrentValue(option_arg);
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
Modified: lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp?rev=369625&r1=369624&r2=369625&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupWatchpoint.cpp Thu Aug 22 01:08:05 2019
@@ -101,9 +101,7 @@ OptionGroupWatchpoint::SetOptionValue(ui
break;
default:
- error.SetErrorStringWithFormat("unrecognized short option '%c'",
- short_option);
- break;
+ llvm_unreachable("Unimplemented option");
}
return error;
More information about the lldb-commits
mailing list