diff options
author | Eric Christopher <echristo@apple.com> | 2012-03-15 08:19:33 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-03-15 08:19:33 +0000 |
commit | 8d101c31d293bcb8ece8fecdb3325cd0728bed08 (patch) | |
tree | 92241436632a32c2c4f9129b34767638513a6d2f /lib/CodeGen/AsmPrinter | |
parent | f963cd3e02cc01453cb9fd1d4f9e20a1e6f97ba2 (diff) | |
download | external_llvm-8d101c31d293bcb8ece8fecdb3325cd0728bed08.zip external_llvm-8d101c31d293bcb8ece8fecdb3325cd0728bed08.tar.gz external_llvm-8d101c31d293bcb8ece8fecdb3325cd0728bed08.tar.bz2 |
Revert the removal of DW_AT_MIPS_linkage_name when we aren't putting
out the DW_AT_name. Older gdbs unfortunately still use it to
disambiguate member functions in templated classes (gdb.cp/templates.exp).
rdar://11043421 (which is now deferred for a bit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index 6319494..389ae46 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1007,6 +1007,14 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) { // Add function template parameters. addTemplateParams(*SPDie, SP.getTemplateParams()); + // Unfortunately this code needs to stay here to work around + // a bug in older gdbs that requires the linkage name to resolve + // multiple template functions. + StringRef LinkageName = SP.getLinkageName(); + if (!LinkageName.empty()) + addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, + getRealLinkageName(LinkageName)); + // If this DIE is going to refer declaration info using AT_specification // then there is no need to add other attributes. if (DeclDie) { @@ -1017,11 +1025,6 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) { return SPDie; } - StringRef LinkageName = SP.getLinkageName(); - if (!LinkageName.empty()) - addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, - getRealLinkageName(LinkageName)); - // Constructors and operators for anonymous aggregates do not have names. if (!SP.getName().empty()) addString(SPDie, dwarf::DW_AT_name, SP.getName()); |