[llvm] r194879 - DwarfDebug: Push DISubprogram through updateSubprogramScopeDIE
David Blaikie
dblaikie at gmail.com
Fri Nov 15 15:13:08 PST 2013
Author: dblaikie
Date: Fri Nov 15 17:13:08 2013
New Revision: 194879
URL: http://llvm.org/viewvc/llvm-project?rev=194879&view=rev
Log:
DwarfDebug: Push DISubprogram through updateSubprogramScopeDIE
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=194879&r1=194878&r2=194879&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Nov 15 17:13:08 2013
@@ -366,17 +366,15 @@ bool DwarfDebug::isSubprogramContext(con
// Find DIE for the given subprogram and attach appropriate DW_AT_low_pc
// and DW_AT_high_pc attributes. If there are global variables in this
// scope then create and insert DIEs for these variables.
-DIE *DwarfDebug::updateSubprogramScopeDIE(CompileUnit *SPCU,
- const MDNode *SPNode) {
- DIE *SPDie = SPCU->getDIE(DIDescriptor(SPNode));
+DIE *DwarfDebug::updateSubprogramScopeDIE(CompileUnit *SPCU, DISubprogram SP) {
+ DIE *SPDie = SPCU->getDIE(SP);
assert(SPDie && "Unable to find subprogram DIE!");
- DISubprogram SP(SPNode);
// If we're updating an abstract DIE, then we will be adding the children and
// object pointer later on. But what we don't want to do is process the
// concrete DIE twice.
- if (DIE *AbsSPDIE = AbstractSPDies.lookup(SPNode)) {
+ if (DIE *AbsSPDIE = AbstractSPDies.lookup(SP)) {
// Pick up abstract subprogram DIE.
SPDie = SPCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *SPCU->getCUDie());
SPCU->addDIEEntry(SPDie, dwarf::DW_AT_abstract_origin, AbsSPDIE);
@@ -624,7 +622,7 @@ DIE *DwarfDebug::constructScopeDIE(Compi
AbstractSPDies.insert(std::make_pair(DS, ScopeDIE));
}
else
- ScopeDIE = updateSubprogramScopeDIE(TheCU, DS);
+ ScopeDIE = updateSubprogramScopeDIE(TheCU, DISubprogram(DS));
}
else {
// Early exit when we know the scope DIE is going to be null.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=194879&r1=194878&r2=194879&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Fri Nov 15 17:13:08 2013
@@ -486,7 +486,7 @@ private:
/// DW_AT_low_pc and DW_AT_high_pc attributes. If there are global
/// variables in this scope then create and insert DIEs for these
/// variables.
- DIE *updateSubprogramScopeDIE(CompileUnit *SPCU, const MDNode *SPNode);
+ DIE *updateSubprogramScopeDIE(CompileUnit *SPCU, DISubprogram SP);
/// \brief Construct new DW_TAG_lexical_block for this scope and
/// attach DW_AT_low_pc/DW_AT_high_pc labels.
More information about the llvm-commits
mailing list