Skip to content

Commit 7ae8bc3

Browse files
author
oli
committed
Add an inlining debuginfo test
1 parent 7101ce9 commit 7ae8bc3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/codegen/inline-debuginfo.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#![crate_type="rlib"]
2+
// compile-flags: -Copt-level=3 -g
3+
4+
#[no_mangle]
5+
#[inline(always)]
6+
pub extern "C" fn callee(x: u32) -> u32 {
7+
x + 4
8+
}
9+
10+
// CHECK-LABEL: caller
11+
// CHECK: call void @llvm.dbg.value(metadata i32 %y, metadata !{{.*}}, metadata !DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value)), !dbg [[A:!.*]]
12+
// CHECK: [[A]] = !DILocation(line: {{.*}}, scope: {{.*}}, inlinedAt: {{.*}})
13+
#[no_mangle]
14+
pub extern "C" fn caller(y: u32) -> u32 {
15+
callee(y - 3)
16+
}

0 commit comments

Comments
 (0)