@@ -2483,10 +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);
2488
+ // FIXME: Set this separately because for TestExprsBug35310 Module::LookupInfo
2489
+ // constructor would unset the eFunctionNameTypeFull! Because of
2490
+ // GetFunctionNameInfo (which for custom linkage names doesn't return
2491
+ // eFunctionNameTypeFull)
2492
+ info.SetNameTypeMask (lldb::eFunctionNameTypeFull |
2493
+ lldb::eFunctionNameTypeMethod);
2490
2494
2491
2495
llvm::DenseMap<uint8_t , DWARFDIE> variant_to_die;
2492
2496
m_index->GetFunctions (info, *this , {}, [&](DWARFDIE entry) {
@@ -2541,7 +2545,7 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
2541
2545
die = it->getSecond ();
2542
2546
}
2543
2547
2544
- if (!die.IsValid ())
2548
+ if (!die.IsValid () || die. GetAttributeValueAsUnsigned (DW_AT_declaration, 0 ) )
2545
2549
return llvm::createStringError (
2546
2550
llvm::formatv (" failed to find definition DIE for [lookup_name={0}] "
2547
2551
" [DIE ID={1:x}] [structor={2}]" ,
0 commit comments