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
This commit is contained in:
Pavel Labath
2018-04-10 09:03:59 +00:00
parent bfa20dddcb
commit 47cbf4a07b
35 changed files with 555 additions and 454 deletions

View File

@@ -14,7 +14,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Host/PosixApi.h"
#include "lldb/Interpreter/Args.h"
#include "lldb/Interpreter/OptionArgParser.h"
#include "lldb/Utility/Stream.h"
#include "lldb/Utility/StringList.h"
#include "llvm/ADT/STLExtras.h"
@@ -47,7 +47,7 @@ Status OptionValueBoolean::SetValueFromString(llvm::StringRef value_str,
case eVarSetOperationReplace:
case eVarSetOperationAssign: {
bool success = false;
bool value = Args::StringToBoolean(value_str, false, &success);
bool value = OptionArgParser::ToBoolean(value_str, false, &success);
if (success) {
m_value_was_set = true;
m_current_value = value;