]> git.lizzy.rs Git - rust.git/blob - tests/codegen/inline-debuginfo.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / codegen / inline-debuginfo.rs
1 #![crate_type="rlib"]
2 // compile-flags: -Copt-level=3 -g
3 //
4
5 #[no_mangle]
6 #[inline(always)]
7 pub extern "C" fn callee(x: u32) -> u32 {
8     x + 4
9 }
10
11 // CHECK-LABEL: caller
12 // 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:!.*]]
13 // CHECK: [[A]] = !DILocation(line: {{.*}}, scope: {{.*}}, inlinedAt: {{.*}})
14 #[no_mangle]
15 pub extern "C" fn caller(y: u32) -> u32 {
16     callee(y - 3)
17 }