Add test case for MIR inlining debuginfo line numbers
This commit is contained in:
parent
9b0a099dfc
commit
9363a1401e
1 changed files with 25 additions and 0 deletions
25
src/test/codegen/mir-inlined-line-numbers.rs
Normal file
25
src/test/codegen/mir-inlined-line-numbers.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
// compile-flags: -O -g
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#[inline(always)]
|
||||
fn foo() {
|
||||
bar();
|
||||
}
|
||||
|
||||
#[inline(never)]
|
||||
#[no_mangle]
|
||||
fn bar() {
|
||||
panic!();
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn example() {
|
||||
foo();
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @example
|
||||
// CHECK: tail call void @bar(), !dbg [[DBG_ID:![0-9]+]]
|
||||
// CHECK: [[DBG_ID]] = !DILocation(line: 18,
|
||||
// CHECK-SAME: inlinedAt: [[INLINE_ID:![0-9]+]])
|
||||
// CHECK: [[INLINE_ID]] = !DILocation(line: 18,
|
Loading…
Add table
Reference in a new issue