diff options
| author | Devang Patel <dpatel@apple.com> | 2008-11-06 21:28:20 +0000 | 
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-11-06 21:28:20 +0000 | 
| commit | 8af0a362f19df00ce1ddd1726503261ef0835f99 (patch) | |
| tree | b11d02d7dc8980a30c59893a850787a50e82e8ea /llvm/lib/CodeGen/SelectionDAG | |
| parent | ef21de946b18749b8ac8434bf640d1298c2a3965 (diff) | |
| download | bcm5719-llvm-8af0a362f19df00ce1ddd1726503261ef0835f99.tar.gz bcm5719-llvm-8af0a362f19df00ce1ddd1726503261ef0835f99.zip | |
Emit label for llvm.dbg.func.start of the inlined function.
llvm-svn: 58814
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 11 | 
1 files changed, 8 insertions, 3 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 404d613ac88..b45a4fd5369 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -349,9 +349,14 @@ bool FastISel::SelectCall(User *I) {        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) { +        const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL); +        BuildMI(MBB, II).addImm(LabelID); +      }      }      return true;    } | 

