Skip to content

Commit 9363a14

Browse files
committed
Add test case for MIR inlining debuginfo line numbers
1 parent 9b0a099 commit 9363a14

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// compile-flags: -O -g
2+
3+
#![crate_type = "lib"]
4+
5+
#[inline(always)]
6+
fn foo() {
7+
bar();
8+
}
9+
10+
#[inline(never)]
11+
#[no_mangle]
12+
fn bar() {
13+
panic!();
14+
}
15+
16+
#[no_mangle]
17+
pub fn example() {
18+
foo();
19+
}
20+
21+
// CHECK-LABEL: @example
22+
// CHECK: tail call void @bar(), !dbg [[DBG_ID:![0-9]+]]
23+
// CHECK: [[DBG_ID]] = !DILocation(line: 18,
24+
// CHECK-SAME: inlinedAt: [[INLINE_ID:![0-9]+]])
25+
// CHECK: [[INLINE_ID]] = !DILocation(line: 18,

0 commit comments

Comments
 (0)