In the spirit of https://reviews.llvm.org/D70846, we only return functions with matching mangled name from Apple/DebugNamesDWARFIndex::GetFunction if eFunctionNameTypeFull is requested.
This speeds up lookup in the presence of large amount of class methods of the same name (a typical examples would be constructors of templates with many instantiations or overloaded operators).
FWIW, I believe neither the old nor the new version of this check are fully correct (but this version is at least much closer to the intended functionality).
eFunctionNameTypeFull is documented as:
The C++ mangled name case is clearly covered. The C and Obj-C are covered because of the (rather interesting...) property for GetMangledName to return the DW_AT_NAME (which is the demangled name for C/Obj-C) when the mangled name is not specified in DWARF. But the demangled C++ name case isn't covered unless I'm missing something.