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/CommandObjectSource.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lldb/source/Commands/CommandObjectSource.cpp') diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 066cc59c5c31..7f2b9f0f8095 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -22,6 +22,7 @@ #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" +#include "lldb/Interpreter/OptionArgParser.h" #include "lldb/Interpreter/Options.h" #include "lldb/Symbol/CompileUnit.h" #include "lldb/Symbol/Function.h" @@ -91,8 +92,8 @@ class CommandObjectSourceInfo : public CommandObjectParsed { break; case 'a': { - address = Args::StringToAddress(execution_context, option_arg, - LLDB_INVALID_ADDRESS, &error); + address = OptionArgParser::ToAddress(execution_context, option_arg, + LLDB_INVALID_ADDRESS, &error); } break; case 's': modules.push_back(std::string(option_arg)); @@ -709,8 +710,8 @@ class CommandObjectSourceList : public CommandObjectParsed { break; case 'a': { - address = Args::StringToAddress(execution_context, option_arg, - LLDB_INVALID_ADDRESS, &error); + address = OptionArgParser::ToAddress(execution_context, option_arg, + LLDB_INVALID_ADDRESS, &error); } break; case 's': modules.push_back(std::string(option_arg)); -- cgit v1.2.3