Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 424199
Collapse All | Expand All

(-)a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (-5 / +2 lines)
Lines 1093-1107 void DwarfDebug::beginInstruction(const MachineInstr *MI) { Link Here
1093
  if (!MI->isDebugValue()) {
1093
  if (!MI->isDebugValue()) {
1094
    DebugLoc DL = MI->getDebugLoc();
1094
    DebugLoc DL = MI->getDebugLoc();
1095
    if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
1095
    if (DL != PrevInstLoc && (!DL.isUnknown() || UnknownLocations)) {
1096
      unsigned Flags = 0;
1096
      unsigned Flags = DWARF2_FLAG_IS_STMT;
1097
      PrevInstLoc = DL;
1097
      PrevInstLoc = DL;
1098
      if (DL == PrologEndLoc) {
1098
      if (DL == PrologEndLoc) {
1099
        Flags |= DWARF2_FLAG_PROLOGUE_END;
1099
        Flags |= DWARF2_FLAG_PROLOGUE_END;
1100
        PrologEndLoc = DebugLoc();
1100
        PrologEndLoc = DebugLoc();
1101
      }
1101
      }
1102
      if (PrologEndLoc.isUnknown())
1103
        Flags |= DWARF2_FLAG_IS_STMT;
1104
1105
      if (!DL.isUnknown()) {
1102
      if (!DL.isUnknown()) {
1106
        const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
1103
        const MDNode *Scope = DL.getScope(Asm->MF->getFunction()->getContext());
1107
        recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
1104
        recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags);
Lines 1382-1388 void DwarfDebug::beginFunction(const MachineFunction *MF) { Link Here
1382
                                       MF->getFunction()->getContext());
1379
                                       MF->getFunction()->getContext());
1383
    recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
1380
    recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
1384
                     FnStartDL.getScope(MF->getFunction()->getContext()),
1381
                     FnStartDL.getScope(MF->getFunction()->getContext()),
1385
                     0);
1382
                     DWARF2_FLAG_IS_STMT);
1386
  }
1383
  }
1387
}
1384
}
1388
1385
(-)a/test/DebugInfo/X86/ending-run.ll (-5 / +2 lines)
Lines 1-11 Link Here
1
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
1
; RUN: llc -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
2
; RUN: llvm-dwarfdump %t | FileCheck %s
2
; RUN: llvm-dwarfdump %t | FileCheck %s
3
3
4
; Check that the line table starts at 7, not 4, but that the first
4
; Check that the line table starts at 7, not 4.
5
; statement isn't until line 8.
6
5
7
; CHECK-NOT: 0x0000000000000000      7      0      1   0  is_stmt
6
; CHECK: 0x0000000000000000      7      0      1   0  is_stmt
8
; CHECK: 0x0000000000000000      7      0      1   0
9
; CHECK: 0x0000000000000004      8     18      1   0  is_stmt prologue_end
7
; CHECK: 0x0000000000000004      8     18      1   0  is_stmt prologue_end
10
8
11
define i32 @callee(i32 %x) nounwind uwtable ssp {
9
define i32 @callee(i32 %x) nounwind uwtable ssp {
12
- 

Return to bug 424199