From 0d9a201e2624998922f825ebbe01aae0cce4bbd5 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Fri, 13 Sep 2019 11:26:48 +0000 Subject: [lldb][NFC] Remove ArgEntry::ref member The StringRef should always be identical to the C string, so we might as well just create the StringRef from the C-string. This might be slightly slower until we implement the storage of ArgEntry with a string instead of a std::unique_ptr. Until then we have to do the additional strlen on the C string to construct the StringRef. llvm-svn: 371842 --- lldb/source/Commands/CommandObjectWatchpoint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp') diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index 67fd27887be..6e59a26c473 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -89,12 +89,12 @@ bool CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs( // Go through the arguments and make a canonical form of arg list containing // only numbers with possible "-" in between. for (auto &entry : args.entries()) { - if ((idx = WithRSAIndex(entry.ref)) == -1) { - StrRefArgs.push_back(entry.ref); + if ((idx = WithRSAIndex(entry.ref())) == -1) { + StrRefArgs.push_back(entry.ref()); continue; } // The Arg contains the range specifier, split it, then. - std::tie(first, second) = entry.ref.split(RSA[idx]); + std::tie(first, second) = entry.ref().split(RSA[idx]); if (!first.empty()) StrRefArgs.push_back(first); StrRefArgs.push_back(Minus); -- cgit v1.2.3