Fix more functions in Args to use StringRef.
This patch also marks the const char* versions as =delete to prevent
their use. This has the potential to cause build breakages on some
platforms which I can't compile. I have tested on Windows, Linux,
and OSX. Best practices for fixing broken callsites are outlined in
Args.h in a comment above the deleted function declarations.
Eventually we can remove these =delete declarations, but for now they
are important to make sure that all implicit conversions from
const char * are manually audited to make sure that they do not invoke a
conversion from nullptr.
llvm-svn: 281919
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 504aa4f..4230601 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -4158,8 +4158,7 @@
alt_name.SetString(value);
} else if (name == "encoding") {
encoding_set = true;
- reg_info.encoding =
- Args::StringToEncoding(value.data(), eEncodingUint);
+ reg_info.encoding = Args::StringToEncoding(value, eEncodingUint);
} else if (name == "format") {
format_set = true;
Format format = eFormatInvalid;
@@ -4198,7 +4197,7 @@
StringConvert::ToUInt32(value.data(), LLDB_INVALID_REGNUM, 0);
} else if (name == "generic") {
reg_info.kinds[eRegisterKindGeneric] =
- Args::StringToGenericRegister(value.data());
+ Args::StringToGenericRegister(value);
} else if (name == "value_regnums") {
SplitCommaSeparatedRegisterNumberString(value, value_regs, 0);
} else if (name == "invalidate_regnums") {