diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-11-10 22:34:29 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-11-10 22:34:29 +0000 |
commit | 01b55b4a808d04cbff7b62f55eaeb62019340bc0 (patch) | |
tree | b86f0307b14541484419b5d5ed310802f0abca33 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 950dba04e0ac7a0ae4d47b43b60f620e053ce26b (diff) |
Check in getOrCreateSubprogramDIE if a declaration exists and if so output
it first.
This is a more general fix to pr11300.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 5d05a3cc3a..581f04bf2b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -598,20 +598,8 @@ void DwarfDebug::constructSubprogramDIE(CompileUnit *TheCU, // class type. return; - DISubprogram SPDecl = SP.getFunctionDeclaration(); - DIE *DeclDie = NULL; - if (SPDecl.isSubprogram()) { - DeclDie = TheCU->getOrCreateSubprogramDIE(SPDecl); - } - DIE *SubprogramDie = TheCU->getOrCreateSubprogramDIE(SP); - if (DeclDie) { - // Refer function declaration directly. - TheCU->addDIEEntry(SubprogramDie, dwarf::DW_AT_specification, - dwarf::DW_FORM_ref4, DeclDie); - } - // Add to map. TheCU->insertDIE(N, SubprogramDie); |