diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectExpression.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp index 01ca3111155..22b456d81b2 100644 --- a/lldb/source/Commands/CommandObjectExpression.cpp +++ b/lldb/source/Commands/CommandObjectExpression.cpp @@ -27,6 +27,7 @@ #include "lldb/Host/OptionParser.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Variable.h" #include "lldb/Target/Language.h" @@ -88,7 +89,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( case 'a': { bool success; bool result; - result = Args::StringToBoolean(option_arg, true, &success); + result = OptionArgParser::ToBoolean(option_arg, true, &success); if (!success) error.SetErrorStringWithFormat( "invalid all-threads value setting: \"%s\"", @@ -99,7 +100,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( case 'i': { bool success; - bool tmp_value = Args::StringToBoolean(option_arg, true, &success); + bool tmp_value = OptionArgParser::ToBoolean(option_arg, true, &success); if (success) ignore_breakpoints = tmp_value; else @@ -111,7 +112,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( case 'j': { bool success; - bool tmp_value = Args::StringToBoolean(option_arg, true, &success); + bool tmp_value = OptionArgParser::ToBoolean(option_arg, true, &success); if (success) allow_jit = tmp_value; else @@ -131,7 +132,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( case 'u': { bool success; - bool tmp_value = Args::StringToBoolean(option_arg, true, &success); + bool tmp_value = OptionArgParser::ToBoolean(option_arg, true, &success); if (success) unwind_on_error = tmp_value; else @@ -146,8 +147,8 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( m_verbosity = eLanguageRuntimeDescriptionDisplayVerbosityFull; break; } - m_verbosity = - (LanguageRuntimeDescriptionDisplayVerbosity)Args::StringToOptionEnum( + m_verbosity = (LanguageRuntimeDescriptionDisplayVerbosity) + OptionArgParser::ToOptionEnum( option_arg, GetDefinitions()[option_idx].enum_values, 0, error); if (!error.Success()) error.SetErrorStringWithFormat( @@ -167,7 +168,7 @@ Status CommandObjectExpression::CommandOptions::SetOptionValue( case 'X': { bool success; - bool tmp_value = Args::StringToBoolean(option_arg, true, &success); + bool tmp_value = OptionArgParser::ToBoolean(option_arg, true, &success); if (success) auto_apply_fixits = tmp_value ? eLazyBoolYes : eLazyBoolNo; else |