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