mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
Even if the subprogram is going to use AT_specification, emit DW_AT_MIPS_linkage_name. This helps gdb and fixes var-path-expr.exp regression reported by gdb testsuite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b47426b4de
commit
ee4a3abede
@ -332,6 +332,11 @@ DIE *DwarfDebug::createSubprogramDIE(DISubprogram SP) {
|
||||
// Add function template parameters.
|
||||
SPCU->addTemplateParams(*SPDie, SP.getTemplateParams());
|
||||
|
||||
StringRef LinkageName = SP.getLinkageName();
|
||||
if (!LinkageName.empty())
|
||||
SPCU->addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, dwarf::DW_FORM_string,
|
||||
getRealLinkageName(LinkageName));
|
||||
|
||||
// If this DIE is going to refer declaration info using AT_specification
|
||||
// then there is no need to add other attributes.
|
||||
if (SP.getFunctionDeclaration().isSubprogram())
|
||||
@ -342,11 +347,6 @@ DIE *DwarfDebug::createSubprogramDIE(DISubprogram SP) {
|
||||
SPCU->addString(SPDie, dwarf::DW_AT_name, dwarf::DW_FORM_string,
|
||||
SP.getName());
|
||||
|
||||
StringRef LinkageName = SP.getLinkageName();
|
||||
if (!LinkageName.empty())
|
||||
SPCU->addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, dwarf::DW_FORM_string,
|
||||
getRealLinkageName(LinkageName));
|
||||
|
||||
SPCU->addSourceLine(SPDie, SP);
|
||||
|
||||
if (SP.isPrototyped())
|
||||
|
Loading…
x
Reference in New Issue
Block a user