mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
6c348aca4e
https://github.com/llvm/llvm-project/pull/89799 changes llvm.dbg.value/declare intrinsics to be in a different, out-of-instruction-line representation. For example call void @llvm.dbg.declare(...) becomes #dbg_declare(...) Update tests accordingly to work with both the old and new way.
18 lines
496 B
Rust
18 lines
496 B
Rust
#![crate_type="rlib"]
|
|
//@ compile-flags: -Copt-level=3 -g
|
|
//
|
|
|
|
#[no_mangle]
|
|
#[inline(always)]
|
|
pub extern "C" fn callee(x: u32) -> u32 {
|
|
x + 4
|
|
}
|
|
|
|
// CHECK-LABEL: caller
|
|
// CHECK: dbg{{.}}value({{(metadata )?}}i32 %y, {{(metadata )?}}!{{.*}}, {{(metadata )?}}!DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value){{.*}} [[A:![0-9]+]]
|
|
// CHECK: [[A]] = !DILocation(line: {{.*}}, scope: {{.*}}, inlinedAt: {{.*}})
|
|
#[no_mangle]
|
|
pub extern "C" fn caller(y: u32) -> u32 {
|
|
callee(y - 3)
|
|
}
|