diff options
author | Devang Patel <dpatel@apple.com> | 2008-11-06 00:30:09 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-11-06 00:30:09 +0000 |
commit | 20dd0460a1b8fe9119949434a9dbe8bdd443c13d (patch) | |
tree | b2351b12e461a9fc255c3b0e72df40909b028c7e /lib/CodeGen | |
parent | 371645034567c4df2c8c1a843caa31101fa239fa (diff) |
Emit label for llvm.dbg.func.start of the inlined function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 738575380d..6a2f2760ee 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3556,9 +3556,12 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { SubprogramDesc *Subprogram = cast<SubprogramDesc>(DD); const CompileUnitDesc *CompileUnit = Subprogram->getFile(); unsigned SrcFile = MMI->RecordSource(CompileUnit); - // Record the source line but does create a label. It will be emitted - // at asm emission time. - MMI->RecordSourceLine(Subprogram->getLine(), 0, SrcFile); + // Record the source line but does not create a label for the normal + // function start. It will be emitted at asm emission time. However, + // create a label if this is a beginning of inlined function. + unsigned LabelID = MMI->RecordSourceLine(Subprogram->getLine(), 0, SrcFile); + if (MMI->getSourceLines().size() != 1) + DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getRoot(), LabelID)); } return 0; |