zturner added inline comments.
================
Comment at: lldb/source/Interpreter/Options.cpp:728
+ for (auto &def : range) {
+ std::string full_name("--");
+ full_name.append(def.long_option);
----------------
clayborg wrote:
> Do we still need std::string here for full_name? We might be able to do
> smarter things with StringRef for all uses of full_name below, including the
> matches.GetStringAtIndex() by seeing if the string at index starts with "--",
> and then just comparing the remainder to "def.long_option"?
Yes, I tried that at first, but soon after noticed that `matches` is an output
parameter, so we would have to fix up the caller to stop making assumptions
that the `--` is tacked onto the beginning. Certainly doable, but it has
potential for growing into a large CL depending on how far down the rabbit hole
we'd have to go to fix everything.
https://reviews.llvm.org/D27780
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits