Skip to content

Commit 47a8ef3

Browse files
committed
restrict linkage name in accel table to swift
1 parent fff31eb commit 47a8ef3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,8 @@ void DwarfUnit::updateAcceleratorTables(const DIScope *Context,
657657
Flags);
658658

659659
if (auto *CT = dyn_cast<DICompositeType>(Ty))
660-
if (Ty->getName() != CT->getIdentifier())
660+
if (Ty->getName() != CT->getIdentifier() &&
661+
CT->getRuntimeLang() == dwarf::DW_LANG_Swift)
661662
DD->addAccelType(*this, CUNode->getNameTableKind(), CT->getIdentifier(),
662663
TyDIE, Flags);
663664

llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,7 @@ DIE *DWARFLinker::DIECloner::cloneDIE(const DWARFDie &InputDIE,
18541854
}
18551855

18561856
if (Success && AttrInfo.MangledName &&
1857+
RuntimeLang == dwarf::DW_LANG_Swift &&
18571858
!AttrInfo.MangledName.getString().empty() &&
18581859
AttrInfo.MangledName != AttrInfo.Name) {
18591860
auto Hash = djbHash(AttrInfo.MangledName.getString().data());

0 commit comments

Comments
 (0)