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 | 9e3e776e289b5a0843dfc646b26d74d0802f16f8 (patch) | |
tree | 66d02f2882d884b25f34402a0668bc5094265cd6 /llvm/lib/CodeGen | |
parent | 0b0c99610c4870ef6202ba1c4616ebd1c2455096 (diff) | |
download | bcm5719-llvm-9e3e776e289b5a0843dfc646b26d74d0802f16f8.tar.gz bcm5719-llvm-9e3e776e289b5a0843dfc646b26d74d0802f16f8.zip |
Emit label for llvm.dbg.func.start of the inlined function.
llvm-svn: 58786
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 738575380d0..6a2f2760ee9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/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; |