summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-02-01 09:10:45 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-02-01 09:10:45 +0000
commitd6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d (patch)
tree9c5579f60abb16e0ef0982d176d3b9613b2562d0 /llvm/lib/CodeGen/DwarfWriter.cpp
parent806700f9738a09c8ddee7e466d8429eda9d7ee66 (diff)
downloadbcm5719-llvm-d6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d.tar.gz
bcm5719-llvm-d6e44ab5ec8bc0bb939a9a595d0c653602cf4a3d.zip
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.
llvm-svn: 46635
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/DwarfWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp
index de5709622bf..96f7c191df1 100644
--- a/llvm/lib/CodeGen/DwarfWriter.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud