summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-12 16:56:47 +0000
committerZachary Turner <zturner@google.com>2016-11-12 16:56:47 +0000
commitfe11483b57c1dc6a6758725e6de0d6804ec59ed1 (patch)
treeaf50255449e1a57e1a528735cfa3458a5e9e66d2 /lldb/source/Commands/CommandObjectBreakpointCommand.cpp
parentc351fb16079ae8c88e868960829107a823a86246 (diff)
downloadbcm5719-llvm-fe11483b57c1dc6a6758725e6de0d6804ec59ed1.tar.gz
bcm5719-llvm-fe11483b57c1dc6a6758725e6de0d6804ec59ed1.zip
Make Options::SetOptionValue take a StringRef.
llvm-svn: 286723
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp13
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;
OpenPOWER on IntegriCloud