[llvm-commits] [llvm] r154120 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/DebugInfo/X86/ending-run.ll
Eric Christopher
echristo at apple.com
Thu Apr 5 13:39:05 PDT 2012
Author: echristo
Date: Thu Apr 5 15:39:05 2012
New Revision: 154120
URL: http://llvm.org/viewvc/llvm-project?rev=154120&view=rev
Log:
Patch to set is_stmt a little better for prologue lines in a function.
This enables debuggers to see what are interesting lines for a
breakpoint rather than any line that starts a function.
rdar://9852092
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/test/DebugInfo/X86/ending-run.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=154120&r1=154119&r2=154120&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Apr 5 15:39:05 2012
@@ -1093,12 +1093,15 @@
if (!MI->isDebugValue()) {
DebugLoc DL = MI->getDebugLoc();
if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
- unsigned Flags = DWARF2_FLAG_IS_STMT;
+ unsigned Flags = 0;
PrevInstLoc = DL;
if (DL == PrologEndLoc) {
Flags |= DWARF2_FLAG_PROLOGUE_END;
PrologEndLoc = DebugLoc();
}
+ if (PrologEndLoc.isUnknown())
+ Flags |= DWARF2_FLAG_IS_STMT;
+
if (!DL.isUnknown()) {
const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
@@ -1378,7 +1381,7 @@
MF->getFunction()->getContext());
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
FnStartDL.getScope(MF->getFunction()->getContext()),
- DWARF2_FLAG_IS_STMT);
+ 0);
}
}
Modified: llvm/trunk/test/DebugInfo/X86/ending-run.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/ending-run.ll?rev=154120&r1=154119&r2=154120&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/ending-run.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/ending-run.ll Thu Apr 5 15:39:05 2012
@@ -1,9 +1,11 @@
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump %t | FileCheck %s
-; Check that the line table starts at 7, not 4.
+; Check that the line table starts at 7, not 4, but that the first
+; statement isn't until line 8.
-; CHECK: 0x0000000000000000 7 0 1 0 is_stmt
+; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt
+; CHECK: 0x0000000000000000 7 0 1 0
; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
define i32 @callee(i32 %x) nounwind uwtable ssp {
More information about the llvm-commits
mailing list