diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-06-06 22:29:05 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-06-06 22:29:05 +0000 |
commit | 3dca59902bfb0a6160bde894401716e4ecc13f38 (patch) | |
tree | 84a2290c197a1b74e2f0da759bc0996bad090afd /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 553eb4a8804314f09990b409c9408de3ab40ae48 (diff) | |
download | bcm5719-llvm-3dca59902bfb0a6160bde894401716e4ecc13f38.tar.gz bcm5719-llvm-3dca59902bfb0a6160bde894401716e4ecc13f38.zip |
DebugInfo: Use the scope of the function declaration, if any, to name a function in DWARF pubnames
This ensures that member functions, for example, are entered into
pubnames with their fully qualified name, rather than inside the global
namespace.
llvm-svn: 210379
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 39bff0d1f7d..433cc3769ed 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -531,8 +531,7 @@ void DwarfDebug::constructAbstractSubprogramScopeDIE(DwarfCompileUnit &TheCU, // shouldn't be found by lookup. AbsDef = &SPCU.createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, DIDescriptor()); - SPCU.applySubprogramAttributes(SP, *AbsDef); - SPCU.addGlobalName(SP.getName(), *AbsDef, resolve(SP.getContext())); + SPCU.applySubprogramAttributesToDefinition(SP, *AbsDef); SPCU.addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined); createAndAddScopeChildren(SPCU, Scope, *AbsDef); @@ -811,8 +810,7 @@ void DwarfDebug::finishSubprogramDefinitions() { // inlined versions during codegen. D = SPCU->getOrCreateSubprogramDIE(SP); // And attach the attributes - SPCU->applySubprogramAttributes(SP, *D); - SPCU->addGlobalName(SP.getName(), *D, resolve(SP.getContext())); + SPCU->applySubprogramAttributesToDefinition(SP, *D); } } } |