diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-01 09:10:45 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-01 09:10:45 +0000 |
commit | 1b08bbca5592351a940bcd164bdec724ee954326 (patch) | |
tree | f11d5f22e3bcdf9bd067d3e90ba002e1e2557c42 /lib/CodeGen/DwarfWriter.cpp | |
parent | a647c92ec2b3c91e1e6de25cc5c7860912c7626b (diff) |
Remove the nasty LABEL hack with a much less evil one. Now llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index de5709622b..96f7c191df 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -2721,6 +2721,11 @@ public: // Assumes in correct section after the entry point. EmitLabel("func_begin", ++SubprogramCount); + + // Emit label for the implicitly defined dbg.stoppoint at the start of + // the function. + const SourceLineInfo &LineInfo = MMI->getSourceLines()[0]; + Asm->printLabel(LineInfo.getLabelID()); } /// EndFunction - Gather and emit post-function debug information. |