2025-02-06 04:25:40 +00:00
|
|
|
// This test ensures that if LTO occurs between crates with different DWARF versions, we
|
|
|
|
// will choose the highest DWARF version for the final binary. This matches Clang's behavior.
|
2025-02-24 11:17:49 +01:00
|
|
|
// Note: `.2byte` directive is used on MIPS.
|
2025-02-06 04:25:40 +00:00
|
|
|
|
|
|
|
//@ only-linux
|
|
|
|
//@ aux-build:dwarf-mixed-versions-lto-aux.rs
|
2025-02-12 08:06:34 -06:00
|
|
|
//@ compile-flags: -C lto -g -Cdwarf-version=5
|
2025-02-06 04:25:40 +00:00
|
|
|
//@ assembly-output: emit-asm
|
|
|
|
//@ no-prefer-dynamic
|
|
|
|
|
|
|
|
extern crate dwarf_mixed_versions_lto_aux;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
dwarf_mixed_versions_lto_aux::check_is_even(&0);
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK: .section .debug_info
|
2025-02-24 11:17:49 +01:00
|
|
|
// CHECK-NOT: {{\.(short|hword|2byte)}} 2
|
|
|
|
// CHECK-NOT: {{\.(short|hword|2byte)}} 4
|
|
|
|
// CHECK: {{\.(short|hword|2byte)}} 5
|