aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-04-09 21:42:11 +0000
committerDevang Patel <dpatel@apple.com>2009-04-09 21:42:11 +0000
commitb396992f68711e473d0cae2ac9c04569f20147b4 (patch)
tree12c07276c5ba1c419017bc48b1fcb65cef12078d /lib/CodeGen/SelectionDAG
parent29c0e3db6275189b77441e1a7d4813993c73d0e2 (diff)
downloadexternal_llvm-b396992f68711e473d0cae2ac9c04569f20147b4.zip
external_llvm-b396992f68711e473d0cae2ac9c04569f20147b4.tar.gz
external_llvm-b396992f68711e473d0cae2ac9c04569f20147b4.tar.bz2
llvm.dbg.func_start also defines beginning of function scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index eefe8a2..e2d85f0 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -370,17 +370,13 @@ bool FastISel::SelectCall(User *I) {
unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(Dir),
CompileUnit.getFilename(FN));
- // 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.
+ // Record the source line.
unsigned Line = Subprogram.getLineNumber();
unsigned LabelID = DW->RecordSourceLine(Line, 0, SrcFile);
setCurDebugLoc(DebugLoc::get(MF.getOrCreateDebugLocID(SrcFile, Line, 0)));
- if (DW->getRecordSourceLineCount() != 1) {
- const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
- BuildMI(MBB, DL, II).addImm(LabelID);
- }
+ // llvm.dbg.func_start also defines beginning of function scope.
+ DW->RecordRegionStart(cast<GlobalVariable>(FSI->getSubprogram()));
}
return true;