[Lldb-commits] [PATCH] D134378: [lldb] Support simplified template names
Michael Buch via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 19 16:22:27 PDT 2022
Michael137 added subscribers: jingham, labath, aprantl.
Michael137 added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2500
+ const llvm::StringRef nameRef = name.GetStringRef();
+ auto it = nameRef.find('<');
+ if (it != llvm::StringRef::npos) {
----------------
Is there some other way to determine whether the debug-info was generated from `-gsimple-template-names`? Then we wouldn't have to check the existence of a `<` in the name in multiple places and wouldn't have to do this lookup speculatively. With this change, if we fail to find a template type in the index, we would do the lookup all over again, only to not find it again. Could that get expensive? Just trying to figure out if we can avoid doing this `GetTypes` call twice.
There have been [talks](https://github.com/llvm/llvm-project/issues/58362) about doing a base-name search by default followed by fuzzy matching on template parameters (though in the context of function names). The `simple-template-names` came up as a good motivator/facilitator for doing so. But for that idea to work here we'd have to be able to retrieve from the index by basename, so perhaps out of the scope of what we're trying to do here
tagging people involved in that discussion: @dblaikie @aprantl @jingham @labath
Other than this, generally LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134378/new/
https://reviews.llvm.org/D134378
More information about the lldb-commits
mailing list