2022-03-16 12:12:30 +00:00
|
|
|
// Verify that debuginfo column numbers are 1-based byte offsets.
|
2020-02-21 00:00:00 +00:00
|
|
|
//
|
2024-02-22 12:10:29 +00:00
|
|
|
//@ ignore-windows
|
|
|
|
//@ compile-flags: -C debuginfo=2
|
2020-02-21 00:00:00 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
unsafe {
|
2020-02-25 00:00:00 +00:00
|
|
|
// Column numbers are 1-based. Regression test for #65437.
|
2023-05-23 13:11:17 +00:00
|
|
|
// CHECK: call void @giraffe(){{( #[0-9]+)?}}, !dbg [[A:!.*]]
|
2020-02-21 00:00:00 +00:00
|
|
|
giraffe();
|
2020-02-25 00:00:00 +00:00
|
|
|
|
|
|
|
// Column numbers use byte offests. Regression test for #67360
|
2023-05-23 13:11:17 +00:00
|
|
|
// CHECK: call void @turtle(){{( #[0-9]+)?}}, !dbg [[B:!.*]]
|
2020-02-25 00:00:00 +00:00
|
|
|
/* ż */ turtle();
|
|
|
|
|
|
|
|
// CHECK: [[A]] = !DILocation(line: 10, column: 9,
|
|
|
|
// CHECK: [[B]] = !DILocation(line: 14, column: 10,
|
2020-02-21 00:00:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
extern "C" {
|
2020-02-21 00:00:00 +00:00
|
|
|
fn giraffe();
|
2020-02-25 00:00:00 +00:00
|
|
|
fn turtle();
|
2020-02-21 00:00:00 +00:00
|
|
|
}
|