diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index ab9ed3fb8b6..5e4ee0ba070 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -280,11 +280,10 @@ are no syntax errors may indicate that a function was declared but never called. ~CommandOptions() override = default; - Error SetOptionValue(uint32_t option_idx, const char *option_arg, + Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override { Error error; const int short_option = m_getopt_table[option_idx].val; - auto option_strref = llvm::StringRef::withNullAsEmpty(option_arg); switch (short_option) { case 'o': @@ -294,8 +293,7 @@ are no syntax errors may indicate that a function was declared but never called. case 's': m_script_language = (lldb::ScriptLanguage)Args::StringToOptionEnum( - llvm::StringRef::withNullAsEmpty(option_arg), - g_breakpoint_add_options[option_idx].enum_values, + option_arg, g_breakpoint_add_options[option_idx].enum_values, eScriptLanguageNone, error); if (m_script_language == eScriptLanguagePython || @@ -308,10 +306,11 @@ are no syntax errors may indicate that a function was declared but never called. case 'e': { bool success = false; - m_stop_on_error = Args::StringToBoolean(option_strref, false, &success); + m_stop_on_error = Args::StringToBoolean(option_arg, false, &success); if (!success) error.SetErrorStringWithFormat( - "invalid value for stop-on-error: \"%s\"", option_arg); + "invalid value for stop-on-error: \"%s\"", + option_arg.str().c_str()); } break; case 'F': @@ -511,7 +510,7 @@ public: ~CommandOptions() override = default; - Error SetOptionValue(uint32_t option_idx, const char *option_arg, + Error SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override { Error error; const int short_option = m_getopt_table[option_idx].val; |