Skip to content

Commit 16b9675

Browse files
committed
fixup! fix custom linkage name test
1 parent a139a9e commit 16b9675

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,11 +2483,14 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
24832483
// eFunctionNameTypeFull for mangled name lookup.
24842484
// eFunctionNameTypeMethod is required for structor lookups (since we look
24852485
// those up by DW_AT_name).
2486-
Module::LookupInfo info(ConstString(lookup_name),
2487-
lldb::eFunctionNameTypeFull |
2488-
lldb::eFunctionNameTypeMethod,
2486+
Module::LookupInfo info(ConstString(lookup_name), {},
24892487
lldb::eLanguageTypeUnknown);
24902488

2489+
// Set this separately because Module::LookupInfo constructor would
2490+
// unset the eFunctionNameTypeFull for custom linkage names.
2491+
info.SetNameTypeMask(lldb::eFunctionNameTypeFull |
2492+
lldb::eFunctionNameTypeMethod);
2493+
24912494
llvm::DenseMap<uint8_t, DWARFDIE> variant_to_die;
24922495
m_index->GetFunctions(info, *this, {}, [&](DWARFDIE entry) {
24932496
if (entry.GetAttributeValueAsUnsigned(llvm::dwarf::DW_AT_declaration, 0))
@@ -2539,7 +2542,7 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
25392542
die = it->getSecond();
25402543
}
25412544

2542-
if (!die.IsValid())
2545+
if (!die.IsValid() || die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
25432546
return llvm::createStringError(
25442547
llvm::formatv("failed to find definition DIE for [lookup_name={0}] "
25452548
"[DIE ID={1:x}] [structor={2}]",

0 commit comments

Comments
 (0)