Nico Rieck | ba848e3 | 2013-04-12 04:06:46 +0000 | [diff] [blame] | 1 | // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -s | FileCheck %s |
Rafael Espindola | 1d37f35 | 2010-11-13 01:06:27 +0000 | [diff] [blame] | 2 | |
| 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 Rieck | ba848e3 | 2013-04-12 04:06:46 +0000 | [diff] [blame] | 10 | // CHECK: Section { |
Rafael Espindola | cad9132 | 2015-04-29 13:55:07 +0000 | [diff] [blame] | 11 | // CHECK: Index: |
| 12 | // CHECK: Name: .debug_line |
Nico Rieck | ba848e3 | 2013-04-12 04:06:46 +0000 | [diff] [blame] | 13 | // CHECK-NEXT: Type: SHT_PROGBITS |
| 14 | // CHECK-NEXT: Flags [ |
| 15 | // CHECK-NEXT: ] |
| 16 | // CHECK-NEXT: Address: 0x0 |
Rafael Espindola | 4130272 | 2015-11-03 19:24:17 +0000 | [diff] [blame] | 17 | // CHECK-NEXT: Offset: |
Paul Robinson | 68ba772 | 2017-12-04 21:27:46 +0000 | [diff] [blame] | 18 | // CHECK-NEXT: Size: 62 |
Nico Rieck | ba848e3 | 2013-04-12 04:06:46 +0000 | [diff] [blame] | 19 | // CHECK-NEXT: Link: 0 |
| 20 | // CHECK-NEXT: Info: 0 |
| 21 | // CHECK-NEXT: AddressAlignment: 1 |
| 22 | // CHECK-NEXT: EntrySize: 0 |
| 23 | // CHECK-NEXT: } |
Rafael Espindola | 1d37f35 | 2010-11-13 01:06:27 +0000 | [diff] [blame] | 24 | |
| 25 | .section .debug_line,"",@progbits |
| 26 | .text |
| 27 | foo: |
| 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 |