Revert "[lldb/DWARF] Only match mangled name in full-name function lookup (with accelerators)"

This reverts commit 1b12766883 because of
breaking the mac test suite.

I'm not certain this is the cause because of a concurrent build breakage
which masked this problem, but the failure messages are related to
symbol lookup, which makes this very likely.
This commit is contained in:
Pavel Labath 2020-01-28 13:42:34 +01:00
parent 3239b5034e
commit d8de349951
2 changed files with 13 additions and 22 deletions

View File

@ -39,8 +39,8 @@ void DWARFIndex::ProcessFunctionDIE(llvm::StringRef name, DIERef ref,
if (!SymbolFileDWARF::DIEInDeclContext(&parent_decl_ctx, die))
return;
// In case of a full match, we insert functions with a matching mangled name.
if (name_type_mask & eFunctionNameTypeFull && die.GetMangledName() == name) {
// In case of a full match, we just insert everything we find.
if (name_type_mask & eFunctionNameTypeFull) {
dies.push_back(die);
return;
}

View File

@ -10,10 +10,6 @@
// RUN: FileCheck --check-prefix=FULL %s
// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED %s
// RUN: lldb-test symbols --name=_ZN3bar3baz3fooEv --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-NAMESPACE %s
// RUN: lldb-test symbols --name=_ZN4sbar3fooEi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-METHOD %s
// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=function %t | \
@ -25,13 +21,9 @@
// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
// RUN: FileCheck --check-prefix=METHOD %s
// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL %s
// RUN: FileCheck --check-prefix=FULL-INDEXED %s
// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED %s
// RUN: lldb-test symbols --name=_ZN3bar3baz3fooEv --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-NAMESPACE %s
// RUN: lldb-test symbols --name=_ZN4sbar3fooEi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-METHOD %s
// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=function %t | \
@ -45,13 +37,9 @@
// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
// RUN: FileCheck --check-prefix=METHOD %s
// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL %s
// RUN: FileCheck --check-prefix=FULL-INDEXED %s
// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED %s
// RUN: lldb-test symbols --name=_ZN3bar3baz3fooEv --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-NAMESPACE %s
// RUN: lldb-test symbols --name=_ZN4sbar3fooEi --find=function --function-flags=full %t | \
// RUN: FileCheck --check-prefix=FULL-MANGLED-METHOD %s
// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=function %t | \
@ -70,17 +58,20 @@
// METHOD-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
// METHOD-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
// FULL-INDEXED: Found 7 functions:
// FULL-INDEXED-DAG: name = "foo()", mangled = "_Z3foov"
// FULL-INDEXED-DAG: name = "foo(int)", mangled = "_Z3fooi"
// FULL-INDEXED-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
// FULL-INDEXED-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
// FULL-INDEXED-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
// FULL-INDEXED-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
// FULL-INDEXED-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
// FULL: Found 0 functions:
// FULL-MANGLED: Found 1 functions:
// FULL-MANGLED-DAG: name = "foo(int)", mangled = "_Z3fooi"
// FULL-MANGLED-NAMESPACE: Found 1 functions:
// FULL-MANGLED-NAMESPACE-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
// FULL-MANGLED-METHOD: Found 1 functions:
// FULL-MANGLED-METHOD-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
// CONTEXT: Found 1 functions:
// CONTEXT-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"