bool ShouldEmitDwarfDebug() const;
//// RecordInlinedFnStart - Indicate the start of a inlined function.
- void RecordInlinedFnStart(Instruction *I, DISubprogram &SP, unsigned LabelID,
- DICompileUnit CU, unsigned Line, unsigned Col);
+ unsigned RecordInlinedFnStart(DISubprogram SP, DICompileUnit CU,
+ unsigned Line, unsigned Col);
/// RecordInlinedFnEnd - Indicate the end of inlined subroutine.
- unsigned RecordInlinedFnEnd(DISubprogram &SP);
+ unsigned RecordInlinedFnEnd(DISubprogram SP);
/// RecordVariableScope - Record scope for the variable declared by
/// DeclareMI. DeclareMI must describe TargetInstrInfo::DECLARE.
}
//// RecordInlinedFnStart - Indicate the start of inlined subroutine.
- void RecordInlinedFnStart(Instruction *FSI, DISubprogram &SP, unsigned LabelID,
- DICompileUnit CU, unsigned Line, unsigned Col) {
+ unsigned RecordInlinedFnStart(DISubprogram &SP, DICompileUnit CU,
+ unsigned Line, unsigned Col) {
+ unsigned LabelID = MMI->NextLabelID();
+
if (!TAI->doesDwarfUsesInlineInfoSection())
- return;
+ return LabelID;
if (TimePassesIsEnabled)
DebugTimer->startTimer();
if (TimePassesIsEnabled)
DebugTimer->stopTimer();
+
+ return LabelID;
}
/// RecordInlinedFnEnd - Indicate the end of inlined subroutine.
//// RecordInlinedFnStart - Global variable GV is inlined at the location marked
//// by LabelID label.
-void DwarfWriter::RecordInlinedFnStart(Instruction *I, DISubprogram &SP,
- unsigned LabelID, DICompileUnit CU,
- unsigned Line, unsigned Col) {
- DD->RecordInlinedFnStart(I, SP, LabelID, CU, Line, Col);
+unsigned DwarfWriter::RecordInlinedFnStart(DISubprogram SP, DICompileUnit CU,
+ unsigned Line, unsigned Col) {
+ return DD->RecordInlinedFnStart(SP, CU, Line, Col);
}
/// RecordInlinedFnEnd - Indicate the end of inlined subroutine.
-unsigned DwarfWriter::RecordInlinedFnEnd(DISubprogram &SP) {
+unsigned DwarfWriter::RecordInlinedFnEnd(DISubprogram SP) {
return DD->RecordInlinedFnEnd(SP);
}
CompileUnit.getGV(), Line, 0)));
if (DW && DW->ShouldEmitDwarfDebug()) {
- unsigned LabelID = MMI->NextLabelID();
+ DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
+ unsigned LabelID = DW->RecordInlinedFnStart(Subprogram,
+ DICompileUnit(PrevLocTpl.CompileUnit),
+ PrevLocTpl.Line,
+ PrevLocTpl.Col);
const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
BuildMI(MBB, DL, II).addImm(LabelID);
- DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
- DW->RecordInlinedFnStart(FSI, Subprogram, LabelID,
- DICompileUnit(PrevLocTpl.CompileUnit),
- PrevLocTpl.Line,
- PrevLocTpl.Col);
}
} else {
// Record the source line.
MF.getOrCreateDebugLocID(CompileUnit.getGV(), Line, 0)));
if (DW && DW->ShouldEmitDwarfDebug()) {
- unsigned LabelID = DAG.getMachineModuleInfo()->NextLabelID();
+ DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
+ unsigned LabelID = DW->RecordInlinedFnStart(Subprogram,
+ DICompileUnit(PrevLocTpl.CompileUnit),
+ PrevLocTpl.Line,
+ PrevLocTpl.Col);
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
getRoot(), LabelID));
- DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
- DW->RecordInlinedFnStart(&FSI, Subprogram, LabelID,
- DICompileUnit(PrevLocTpl.CompileUnit),
- PrevLocTpl.Line,
- PrevLocTpl.Col);
}
} else {
// Record the source line.