blob: 21eac60d896d1c08e17943f7d4d67e37003bd22c [file] [log] [blame]
Nico Rieckba848e32013-04-12 04:06:46 +00001// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s
Rafael Espindola1d37f352010-11-13 01:06:27 +00002
3// Test that we don't regress on the size of the line info section. We used
4// to handle negative line diffs incorrectly which manifested as very
5// large integers being passed to DW_LNS_advance_line.
6
7// FIXME: This size is the same as gnu as, but we can probably do a bit better.
8// FIXME2: We need a debug_line dumper so that we can test the actual contents.
9
Nico Rieckba848e32013-04-12 04:06:46 +000010// CHECK: Section {
Rafael Espindolacad91322015-04-29 13:55:07 +000011// CHECK: Index:
12// CHECK: Name: .debug_line
Nico Rieckba848e32013-04-12 04:06:46 +000013// CHECK-NEXT: Type: SHT_PROGBITS
14// CHECK-NEXT: Flags [
15// CHECK-NEXT: ]
16// CHECK-NEXT: Address: 0x0
Rafael Espindola41302722015-11-03 19:24:17 +000017// CHECK-NEXT: Offset:
Paul Robinson68ba7722017-12-04 21:27:46 +000018// CHECK-NEXT: Size: 62
Nico Rieckba848e32013-04-12 04:06:46 +000019// CHECK-NEXT: Link: 0
20// CHECK-NEXT: Info: 0
21// CHECK-NEXT: AddressAlignment: 1
22// CHECK-NEXT: EntrySize: 0
23// CHECK-NEXT: }
Rafael Espindola1d37f352010-11-13 01:06:27 +000024
25 .section .debug_line,"",@progbits
26 .text
27foo:
28 .file 1 "Driver.ii"
29 .loc 1 2 0
30 nop
31 .loc 1 4 0
32 nop
33 .loc 1 3 0
34 nop