diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-20 03:23:24 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-20 03:23:24 +0000 |
commit | 8e1d489351b9cb2c91f81429f12aea4160c12e2a (patch) | |
tree | dc71c85dd6e5342eb0cca54ac916e1feea13a999 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | e837e96a82a473da53ef43bf624ccd57bd0f1ebf (diff) | |
download | bcm5719-llvm-8e1d489351b9cb2c91f81429f12aea4160c12e2a.tar.gz bcm5719-llvm-8e1d489351b9cb2c91f81429f12aea4160c12e2a.zip |
DebugInfo: Emit function definitions within their namespace scope.
This workaround (presumably for ancient GDB) doesn't appear to be
required (GDB 7.5 seems to tolerate function definition DIEs in
namespace scope just fine).
llvm-svn: 209189
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c649aa13452..5688d55fafd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -326,28 +326,6 @@ DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU, // Pick up abstract subprogram DIE. SPDie = &SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, SPCU.getUnitDie()); SPCU.addDIEEntry(*SPDie, dwarf::DW_AT_abstract_origin, *AbsSPDIE); - } else if (!SP.getFunctionDeclaration()) { - // There is not any need to generate specification DIE for a function - // defined at compile unit level. If a function is defined inside another - // function then gdb prefers the definition at top level and but does not - // expect specification DIE in parent function. So avoid creating - // specification DIE for a function defined inside a function. - DIScope SPContext = resolve(SP.getContext()); - if (SP.isDefinition() && !SPContext.isCompileUnit() && - !SPContext.isFile() && !isSubprogramContext(SPContext)) { - SPCU.addFlag(*SPDie, dwarf::DW_AT_declaration); - - // Add arguments. - DICompositeType SPTy = SP.getType(); - DIArray Args = SPTy.getTypeArray(); - uint16_t SPTag = SPTy.getTag(); - if (SPTag == dwarf::DW_TAG_subroutine_type) - SPCU.constructSubprogramArguments(*SPDie, Args); - DIE *SPDeclDie = SPDie; - SPDie = - &SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, SPCU.getUnitDie()); - SPCU.addDIEEntry(*SPDie, dwarf::DW_AT_specification, *SPDeclDie); - } } attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym); |