Add test case for MIR inlining debuginfo line numbers

This commit is contained in:
Wesley Wiser 2022-10-14 14:09:30 -04:00
parent 9b0a099dfc
commit 9363a1401e

View 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,