From 47cbf4a07bdfe8f5ef56be7a0caf003f91a00a9e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 10 Apr 2018 09:03:59 +0000 Subject: Move Args::StringTo*** functions to a new OptionArgParser class Summary: The idea behind this is to move the functionality which depend on other lldb classes into a separate class. This way, the Args class can be turned into a lightweight arc+argv wrapper and moved into the lower lldb layers. Reviewers: jingham, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D44306 llvm-svn: 329677 --- lldb/source/Commands/CommandObjectBreakpointCommand.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lldb/source/Commands/CommandObjectBreakpointCommand.cpp') diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp index 170cb8513116..95a17db80816 100644 --- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp +++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp @@ -22,6 +22,7 @@ #include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" @@ -293,7 +294,7 @@ are no syntax errors may indicate that a function was declared but never called. break; case 's': - m_script_language = (lldb::ScriptLanguage)Args::StringToOptionEnum( + m_script_language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum( option_arg, g_breakpoint_add_options[option_idx].enum_values, eScriptLanguageNone, error); @@ -307,7 +308,8 @@ 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_arg, false, &success); + m_stop_on_error = + OptionArgParser::ToBoolean(option_arg, false, &success); if (!success) error.SetErrorStringWithFormat( "invalid value for stop-on-error: \"%s\"", -- cgit v1.2.3