summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter/OptionValueUUID.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Interpreter/OptionValueUUID.cpp')
-rw-r--r--lldb/source/Interpreter/OptionValueUUID.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/OptionValueUUID.cpp b/lldb/source/Interpreter/OptionValueUUID.cpp
index bd6858cee67..a1f16e146a3 100644
--- a/lldb/source/Interpreter/OptionValueUUID.cpp
+++ b/lldb/source/Interpreter/OptionValueUUID.cpp
@@ -79,8 +79,9 @@ size_t OptionValueUUID::AutoComplete(CommandInterpreter &interpreter,
const size_t num_modules = target->GetImages().GetSize();
if (num_modules > 0) {
UUID::ValueType uuid_bytes;
- llvm::StringRef rest = UUID::DecodeUUIDBytesFromString(s, uuid_bytes);
- const size_t num_bytes_decoded = s.size() - rest.size();
+ size_t num_bytes_decoded = 0;
+ llvm::StringRef rest =
+ UUID::DecodeUUIDBytesFromString(s, uuid_bytes, num_bytes_decoded);
for (size_t i = 0; i < num_modules; ++i) {
ModuleSP module_sp(target->GetImages().GetModuleAtIndex(i));
if (module_sp) {
OpenPOWER on IntegriCloud