Skip to content

Commit 305bf12

Browse files
Test for 1-based columns in debuginfo
1 parent b43a682 commit 305bf12

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Ensure that columns emitted in DWARF are 1-based
2+
3+
// ignore-windows
4+
// compile-flags: -g -C no-prepopulate-passes
5+
6+
#![allow(dead_code)]
7+
#![allow(unused_variables)]
8+
#![allow(unused_assignments)]
9+
10+
fn main() { // 10
11+
let x = 32; // 11
12+
} // 12
13+
// | |
14+
// | |
15+
// 5 9 column index
16+
17+
// CHECK-LABEL: !DISubprogram(name: "main"
18+
// CHECK: !DILocalVariable(name: "x",{{.*}}line: 11{{[^0-9]}}
19+
// CHECK-NEXT: !DILexicalBlock({{.*}}line: 11, column: 5{{[^0-9]}}
20+
// CHECK-NEXT: !DILocation(line: 11, column: 9{{[^0-9]}}
21+
// CHECK: !DILocation(line: 12, column: 1{{[^0-9]}}
22+
// CHECK-EMPTY:

0 commit comments

Comments
 (0)