[Lldb-commits] [PATCH] D104067: [lldb] Decouple ObjCLanguage from Symtab
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 10 16:15:15 PDT 2021
jingham added a comment.
This looks pretty good to me.
It's a little awkward in InitNameIndexes that we look up the various NameToSymbolIndex maps by eFunctionNameType, use the function name type again to sort the names & index pairs into the bucket we looked up before. I wonder if that could be made cleaner by having an
AddToSymbolNameToIndexMap(symbol_name, index, func_name_type)
interface, which would just sort the symbol names into the right map. Not sure that's worth the bother, however.
================
Comment at: lldb/source/Symbol/Symtab.cpp:332
// name, add the version without categories to the index too.
- ObjCLanguage::MethodName objc_method(name.GetStringRef(), true);
- if (objc_method.IsValid(true)) {
- selector_to_index.Append(objc_method.GetSelector(), value);
-
- if (ConstString objc_method_no_category =
- objc_method.GetFullNameWithoutCategory(true))
- name_to_index.Append(objc_method_no_category, value);
+ if (auto *objc_lang = Language::FindPlugin(lldb::eLanguageTypeObjC)) {
+ for (auto variant_name_and_type :
----------------
Shouldn't this be in a loop over the supported languages?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104067/new/
https://reviews.llvm.org/D104067
More information about the lldb-commits
mailing list