@@ -2483,11 +2483,14 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
2483
2483
// eFunctionNameTypeFull for mangled name lookup.
2484
2484
// eFunctionNameTypeMethod is required for structor lookups (since we look
2485
2485
// 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), {},
2489
2487
lldb::eLanguageTypeUnknown);
2490
2488
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
+
2491
2494
llvm::DenseMap<uint8_t , DWARFDIE> variant_to_die;
2492
2495
m_index->GetFunctions (info, *this , {}, [&](DWARFDIE entry) {
2493
2496
if (entry.GetAttributeValueAsUnsigned (llvm::dwarf::DW_AT_declaration, 0 ))
@@ -2539,7 +2542,7 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
2539
2542
die = it->getSecond ();
2540
2543
}
2541
2544
2542
- if (!die.IsValid ())
2545
+ if (!die.IsValid () || die. GetAttributeValueAsUnsigned (DW_AT_declaration, 0 ) )
2543
2546
return llvm::createStringError (
2544
2547
llvm::formatv (" failed to find definition DIE for [lookup_name={0}] "
2545
2548
" [DIE ID={1:x}] [structor={2}]" ,
0 commit comments