diff options
author | Eric Christopher <echristo@gmail.com> | 2013-05-09 00:42:33 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-05-09 00:42:33 +0000 |
commit | c496875f0c205ffadcec8060e1170e1c58e4eb55 (patch) | |
tree | 7986ee729a8168c71c5e5b8268b46797da0c67c9 /lib/CodeGen | |
parent | c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073 (diff) | |
download | external_llvm-c496875f0c205ffadcec8060e1170e1c58e4eb55.zip external_llvm-c496875f0c205ffadcec8060e1170e1c58e4eb55.tar.gz external_llvm-c496875f0c205ffadcec8060e1170e1c58e4eb55.tar.bz2 |
Revert "Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)"
temporarily while investigating gdb.cp/templates.exp.
This reverts commit r181471.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index b56255c..c38ada6 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1150,24 +1150,20 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) { // Add function template parameters. addTemplateParams(*SPDie, SP.getTemplateParams()); + // Unfortunately this code needs to stay here instead of below the + // AT_specification code in order to work around a bug in older + // gdbs that requires the linkage name to resolve multiple template + // functions. + // TODO: Remove this set of code when we get rid of the old gdb + // compatibility. StringRef LinkageName = SP.getLinkageName(); + if (!LinkageName.empty() && DD->useDarwinGDBCompat()) + 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, except - // DW_AT_MIPS_linkage_name in two cases: - // 1) The current DIE has a linkage name but the referred-to declaration - // doesn't have one (e.g. constructor/destructor). - // 2) To work around a bug in older gdbs that requires the linkage name to - // resolve multiple template functions. TODO: Remove this case (the - // DD->useDarwinGDBCompat() condition) when we get rid of the old gdb - // compatibility. - + // then there is no need to add other attributes. if (DeclDie) { - if (!LinkageName.empty() - && (SPDecl.getLinkageName().empty() || DD->useDarwinGDBCompat())) - addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, - getRealLinkageName(LinkageName)); - // Refer function declaration directly. addDIEEntry(SPDie, dwarf::DW_AT_specification, dwarf::DW_FORM_ref4, DeclDie); @@ -1176,7 +1172,7 @@ DIE *CompileUnit::getOrCreateSubprogramDIE(DISubprogram SP) { } // Add the linkage name if we have one. - if (!LinkageName.empty()) + if (!LinkageName.empty() && !DD->useDarwinGDBCompat()) addString(SPDie, dwarf::DW_AT_MIPS_linkage_name, getRealLinkageName(LinkageName)); |