bulbazord added a comment.

In D103210#2784645 <https://reviews.llvm.org/D103210#2784645>, @teemperor wrote:

> +1 to not add any language-specific terms to the Language API.
>
> Looking over the code, it seems what the code is doing its:
>
> - Going over the symbol names.
> - Creating a search index from the symbol names that is optionally grouped 
> via the `FunctionNameType` cases (and there is a 'eFunctionNameTypeSelector' 
> which isn't that nice but that's why we try to do selector-specific stuff).
>
> So what about having an API that for a given symbol name gives us all the 
> alternative names we should put into this search index (and optionally a 
> `FunctionNameType` so we can put it into the right group)? I guess C++ could 
> also benefit from the same API as it would just return the right basenames 
> then?

We have a method called `Language::GetMethodNameVariants`, that could be 
extended/modified to be more suitable. Unless you had something else in mind? 
Maybe something more specific to Symtab mapping like 
`Language::GetFunctionNameSearchVariants`.

> If we make the different `m_*to_index` maps in Symtab into something two 
> nested maps with the form `FunctionNameType -> name -> index`, then that 
> would also remove quite a bit of copy-pasted code in Symtab.cpp

This makes sense to me, I'll also make this change in this patch :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103210/new/

https://reviews.llvm.org/D103210

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to