diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-07 00:16:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-05-07 00:16:31 +0000 |
commit | 116b27444a206a2831d88fea5ce34ced8184ceca (patch) | |
tree | a32dd416fccac9d40ccc7527bd6ac2a3972e95eb /lib/CodeGen | |
parent | 0a8eb57c3d57a79f382b8db32059ea3689f7a076 (diff) | |
download | external_llvm-116b27444a206a2831d88fea5ce34ced8184ceca.tar.gz external_llvm-116b27444a206a2831d88fea5ce34ced8184ceca.tar.bz2 external_llvm-116b27444a206a2831d88fea5ce34ced8184ceca.zip |
Make DwarfWriter::RecordInlinedFnStart more like the other DwarfWriter's methods:
-Have it return a label ID
-Remove the unused Instruction parameter
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 19 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 11 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 11 |
3 files changed, 21 insertions, 20 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index f12bcd38cb..cb53168b41 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -3487,10 +3487,12 @@ public: } //// 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(); @@ -3520,6 +3522,8 @@ public: if (TimePassesIsEnabled) DebugTimer->stopTimer(); + + return LabelID; } /// RecordInlinedFnEnd - Indicate the end of inlined subroutine. @@ -4749,14 +4753,13 @@ bool DwarfWriter::ShouldEmitDwarfDebug() const { //// 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); } diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index f7100515b2..22051867a0 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -397,14 +397,13 @@ bool FastISel::SelectCall(User *I) { 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. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index a91dd8e715..fd89108392 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3981,14 +3981,13 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { 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. |