• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Verify that debuginfo column numbers are 1-based byte offsets.
2 //
3 // ignore-windows
4 // compile-flags: -C debuginfo=2
5 
main()6 fn main() {
7     unsafe {
8         // Column numbers are 1-based. Regression test for #65437.
9         // CHECK: call void @giraffe(){{( #[0-9]+)?}}, !dbg [[A:!.*]]
10         giraffe();
11 
12         // Column numbers use byte offests. Regression test for #67360
13         // CHECK: call void @turtle(){{( #[0-9]+)?}}, !dbg [[B:!.*]]
14 /* ż */ turtle();
15 
16         // CHECK: [[A]] = !DILocation(line: 10, column: 9,
17         // CHECK: [[B]] = !DILocation(line: 14, column: 10,
18     }
19 }
20 
21 extern "C" {
giraffe()22     fn giraffe();
turtle()23     fn turtle();
24 }
25