Use byte offsets when emitting debuginfo columns
This commit is contained in:
parent
e1a5472508
commit
0c51f2f5a5
6 changed files with 68 additions and 48 deletions
|
@ -1,16 +1,24 @@
|
|||
// Verify that emitted debuginfo column nubmers are 1-based. Regression test for issue #65437.
|
||||
// Verify that debuginfo column nubmers are 1-based byte offsets.
|
||||
//
|
||||
// ignore-windows
|
||||
// compile-flags: -C debuginfo=2
|
||||
|
||||
fn main() {
|
||||
unsafe {
|
||||
// CHECK: call void @giraffe(), !dbg [[DBG:!.*]]
|
||||
// CHECK: [[DBG]] = !DILocation(line: 10, column: 9
|
||||
// Column numbers are 1-based. Regression test for #65437.
|
||||
// CHECK: call void @giraffe(), !dbg [[A:!.*]]
|
||||
giraffe();
|
||||
|
||||
// Column numbers use byte offests. Regression test for #67360
|
||||
// CHECK: call void @turtle(), !dbg [[B:!.*]]
|
||||
/* ż */ turtle();
|
||||
|
||||
// CHECK: [[A]] = !DILocation(line: 10, column: 9,
|
||||
// CHECK: [[B]] = !DILocation(line: 14, column: 10,
|
||||
}
|
||||
}
|
||||
|
||||
extern {
|
||||
fn giraffe();
|
||||
fn turtle();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue