labath added a comment. In D128366#3605484 <https://reviews.llvm.org/D128366#3605484>, @bulbazord wrote:
> In D128366#3603943 <https://reviews.llvm.org/D128366#3603943>, @labath wrote: > >> Could we move this pruning elsewhere? These values come from the symbol file >> plugins anyway, and they can do a better job at determining which language >> does a particular name belong to. >> (OK, they can an also come from the symtab, but there I guess we could infer >> something from the mangling scheme). > > We're specifically pruning the results from a name lookup, so I'm not sure > where would be a better place to move it. Well. I guess ideally I would pass whatever information is needed into the lookup functions themselves, so that there is no need for the additional filtering. I don't know why it's done this way but this setup seems inefficient, as we have to generate all these SymbolContext only for them to be (potentially) thrown away... ================ Comment at: lldb/include/lldb/Target/Language.h:320 + virtual bool NamesAreEquivalentWithContext( + const ConstString &user_provided_name, + const ConstString &full_name_with_context) const { ---------------- bulbazord wrote: > labath wrote: > > I think we're passing ConstStrings by value these days... > I see. Is there a reason we do that instead of passing by reference? ConstString is just a fancy wrapper around a const char *, so adding a layer of indirection does not really save us anything (in fact, it's the opposite). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128366/new/ https://reviews.llvm.org/D128366 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits