summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionGroupPlatform.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-09-23 17:48:13 +0000
committerZachary Turner <zturner@google.com>2016-09-23 17:48:13 +0000
commit8cef4b0bb4bae8598efa7cd1274e54f534b0f4a4 (patch)
tree1ce2972876d13303fcd7f12d5774f806921d3421 /lldb/source/Interpreter/OptionGroupPlatform.cpp
parent6c46efba7818644ddab8d8c52940583c0672fd98 (diff)
downloadbcm5719-llvm-8cef4b0bb4bae8598efa7cd1274e54f534b0f4a4.tar.gz
bcm5719-llvm-8cef4b0bb4bae8598efa7cd1274e54f534b0f4a4.zip
Update OptionGroup::SetValue to take StringRef.
Then deal with all the fallout. Differential Revision: https://reviews.llvm.org/D24847 llvm-svn: 282265
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupPlatform.cpp')
-rw-r--r--lldb/source/Interpreter/OptionGroupPlatform.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Interpreter/OptionGroupPlatform.cpp b/lldb/source/Interpreter/OptionGroupPlatform.cpp
index 7958d34ba9a..62311626f10 100644
--- a/lldb/source/Interpreter/OptionGroupPlatform.cpp
+++ b/lldb/source/Interpreter/OptionGroupPlatform.cpp
@@ -93,14 +93,13 @@ llvm::ArrayRef<OptionDefinition> OptionGroupPlatform::GetDefinitions() {
}
Error OptionGroupPlatform::SetOptionValue(uint32_t option_idx,
- const char *option_arg,
+ llvm::StringRef option_arg,
ExecutionContext *execution_context) {
Error error;
if (!m_include_platform_option)
++option_idx;
const int short_option = g_option_table[option_idx].short_option;
- llvm::StringRef option_strref(option_arg ? option_arg : "");
switch (short_option) {
case 'p':
@@ -108,17 +107,18 @@ Error OptionGroupPlatform::SetOptionValue(uint32_t option_idx,
break;
case 'v':
- if (!Args::StringToVersion(option_strref, m_os_version_major,
+ if (!Args::StringToVersion(option_arg, m_os_version_major,
m_os_version_minor, m_os_version_update))
- error.SetErrorStringWithFormat("invalid version string '%s'", option_arg);
+ error.SetErrorStringWithFormat("invalid version string '%s'",
+ option_arg.str().c_str());
break;
case 'b':
- m_sdk_build.SetCString(option_arg);
+ m_sdk_build.SetString(option_arg);
break;
case 'S':
- m_sdk_sysroot.SetCString(option_arg);
+ m_sdk_sysroot.SetString(option_arg);
break;
default:
OpenPOWER on IntegriCloud