Magellan Linux

Annotation of /trunk/llvm/patches/llvm-3.2-fix-debug-line-info.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2052 - (hide annotations) (download)
Tue Jan 29 12:58:35 2013 UTC (11 years, 3 months ago) by niro
File size: 2614 byte(s)
-fixes from arch
1 niro 2052 From 737fdba46f2b2b7d39bc728d15ea2334c44779e0 Mon Sep 17 00:00:00 2001
2     From: Ben Longbons <b.r.longbons@gmail.com>
3     Date: Fri, 29 Jun 2012 12:58:34 -0700
4     Subject: [PATCH] Revert "Patch to set is_stmt a little better for prologue
5     lines in a function."
6    
7     This meants that the debugger could find meaningful line information.
8    
9     This reverts commit 60b35f408bc3194e7ea4e96367c0b42dc5e7f850.
10     ---
11     lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 ++-----
12     test/DebugInfo/X86/ending-run.ll | 6 ++----
13     2 files changed, 4 insertions(+), 9 deletions(-)
14    
15     diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
16     index 3e79a6d..24aedfb 100644
17     --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
18     +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
19     @@ -1093,15 +1093,12 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
20     if (!MI->isDebugValue()) {
21     DebugLoc DL = MI->getDebugLoc();
22     if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
23     - unsigned Flags = 0;
24     + unsigned Flags = DWARF2_FLAG_IS_STMT;
25     PrevInstLoc = DL;
26     if (DL == PrologEndLoc) {
27     Flags |= DWARF2_FLAG_PROLOGUE_END;
28     PrologEndLoc = DebugLoc();
29     }
30     - if (PrologEndLoc.isUnknown())
31     - Flags |= DWARF2_FLAG_IS_STMT;
32     -
33     if (!DL.isUnknown()) {
34     const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
35     recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
36     @@ -1382,7 +1379,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
37     MF->getFunction()->getContext());
38     recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
39     FnStartDL.getScope(MF->getFunction()->getContext()),
40     - 0);
41     + DWARF2_FLAG_IS_STMT);
42     }
43     }
44    
45     diff --git a/test/DebugInfo/X86/ending-run.ll b/test/DebugInfo/X86/ending-run.ll
46     index 6935c47..0cd3de1 100644
47     --- a/test/DebugInfo/X86/ending-run.ll
48     +++ b/test/DebugInfo/X86/ending-run.ll
49     @@ -1,11 +1,9 @@
50     ; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
51     ; RUN: llvm-dwarfdump %t | FileCheck %s
52    
53     -; Check that the line table starts at 7, not 4, but that the first
54     -; statement isn't until line 8.
55     +; Check that the line table starts at 7, not 4.
56    
57     -; CHECK-NOT: 0x0000000000000000 7 0 1 0 is_stmt
58     -; CHECK: 0x0000000000000000 7 0 1 0
59     +; CHECK: 0x0000000000000000 7 0 1 0 is_stmt
60     ; CHECK: 0x0000000000000004 8 18 1 0 is_stmt prologue_end
61    
62     define i32 @callee(i32 %x) nounwind uwtable ssp {
63     --
64     1.7.10