forked from OSchip/llvm-project
DebugInfo: Attach DW_AT_inline to inlined subprograms at DIE-construction time rather than as a post-processing step.
llvm-svn: 208636
This commit is contained in:
parent
36072da3d9
commit
525358db2c
|
@ -495,6 +495,7 @@ DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU,
|
||||||
}
|
}
|
||||||
|
|
||||||
InlinedSubprogramDIEs.insert(OriginDIE);
|
InlinedSubprogramDIEs.insert(OriginDIE);
|
||||||
|
TheCU.addUInt(*OriginDIE, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
||||||
|
|
||||||
// Add the call site information to the DIE.
|
// Add the call site information to the DIE.
|
||||||
DILocation DL(Scope->getInlinedAt());
|
DILocation DL(Scope->getInlinedAt());
|
||||||
|
@ -857,10 +858,6 @@ void DwarfDebug::beginModule() {
|
||||||
|
|
||||||
// Attach DW_AT_inline attribute with inlined subprogram DIEs.
|
// Attach DW_AT_inline attribute with inlined subprogram DIEs.
|
||||||
void DwarfDebug::computeInlinedDIEs() {
|
void DwarfDebug::computeInlinedDIEs() {
|
||||||
// Attach DW_AT_inline attribute with inlined subprogram DIEs.
|
|
||||||
for (DIE *ISP : InlinedSubprogramDIEs)
|
|
||||||
FirstCU->addUInt(*ISP, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
|
|
||||||
|
|
||||||
for (const auto &AI : AbstractSPDies) {
|
for (const auto &AI : AbstractSPDies) {
|
||||||
DIE &ISP = *AI.second;
|
DIE &ISP = *AI.second;
|
||||||
if (InlinedSubprogramDIEs.count(&ISP))
|
if (InlinedSubprogramDIEs.count(&ISP))
|
||||||
|
|
Loading…
Reference in New Issue