[Lldb-commits] [PATCH] D73191: Ignore methods in full-name function lookup (with accelerators)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 24 04:35:00 PST 2020

labath added inline comments.

Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp:45
   if (name_type_mask & eFunctionNameTypeFull) {
-    dies.push_back(die);
-    return;
+    if (!die.IsMethod() || die.GetMangledName(false) == name) {
+      dies.push_back(die);
I don't believe the `IsMethod` check is really needed here -- the mangled name check should handle everything.

In fact, looking at the implementation of `DWARFDebugInfoEntry::GetMangledName`, I don't think you even need the extra `substitute_name_allowed=false` part. The default value should do exactly what we need. If the DIE has a linkage (mangled) name it will return it and we will use that for comparison. For an `extern "C"` function it will return the regular name, and we will compare that instead (this check is somewhat redundant because if the name doesn't match, the function should not be in the index in the first place, but I don't think it hurts to check either).

Am I missing something?

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list