diff options
author | David Spickett <david.spickett@linaro.org> | 2022-05-09 10:50:03 +0000 |
---|---|---|
committer | David Spickett <david.spickett@linaro.org> | 2022-05-16 10:46:56 +0000 |
commit | e473e79cd194d7a74158ff7e8b97076a7f71c511 (patch) | |
tree | b8077d837e851cf6e3ad36a39ef7247ff499492b /lldb/source/Interpreter/CommandObject.cpp | |
parent | aab5bd180a42f7501a91bcaa5b4906ba7e67ce0e (diff) | |
download | llvm-e473e79cd194d7a74158ff7e8b97076a7f71c511.zip llvm-e473e79cd194d7a74158ff7e8b97076a7f71c511.tar.gz llvm-e473e79cd194d7a74158ff7e8b97076a7f71c511.tar.bz2 |
[lldb][NFC] Make cmd a reference in GenerateOptionUsage
Nowhere in lldb do we call this with a null pointer.
If we did, the first line of the function would fault anyway.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D125218
Diffstat (limited to 'lldb/source/Interpreter/CommandObject.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandObject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index dcae27f..b38bf86 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -132,7 +132,7 @@ bool CommandObject::ParseOptions(Args &args, CommandReturnObject &result) { } else { // No error string, output the usage information into result options->GenerateOptionUsage( - result.GetErrorStream(), this, + result.GetErrorStream(), *this, GetCommandInterpreter().GetDebugger().GetTerminalWidth()); } } @@ -326,7 +326,7 @@ bool CommandObject::HelpTextContainsWord(llvm::StringRef search_word, if (!found_word && search_options && GetOptions() != nullptr) { StreamString usage_help; GetOptions()->GenerateOptionUsage( - usage_help, this, + usage_help, *this, GetCommandInterpreter().GetDebugger().GetTerminalWidth()); if (!usage_help.Empty()) { llvm::StringRef usage_text = usage_help.GetString(); @@ -863,7 +863,7 @@ void CommandObject::GenerateHelpText(Stream &output_strm) { Options *options = GetOptions(); if (options != nullptr) { options->GenerateOptionUsage( - output_strm, this, + output_strm, *this, GetCommandInterpreter().GetDebugger().GetTerminalWidth()); } llvm::StringRef long_help = GetHelpLong(); |