Skip to content

Commit 03fb460

Browse files
committed
fixup! fix custom linkage name test
1 parent b716bcb commit 03fb460

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,10 +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);
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);
24902494

24912495
llvm::DenseMap<uint8_t, DWARFDIE> variant_to_die;
24922496
m_index->GetFunctions(info, *this, {}, [&](DWARFDIE entry) {
@@ -2541,7 +2545,7 @@ llvm::Error SymbolFileDWARF::FindAndResolveFunction(
25412545
die = it->getSecond();
25422546
}
25432547

2544-
if (!die.IsValid())
2548+
if (!die.IsValid() || die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0))
25452549
return llvm::createStringError(
25462550
llvm::formatv("failed to find definition DIE for [lookup_name={0}] "
25472551
"[DIE ID={1:x}] [structor={2}]",

0 commit comments

Comments
 (0)