]> git.lizzy.rs Git - rust.git/blob - tests/codegen/abi-efiapi.rs
Rollup merge of #106477 - Nathan-Fenner:nathanf/refined-error-span-trait-impl, r...
[rust.git] / tests / codegen / abi-efiapi.rs
1 // Checks if the correct annotation for the efiapi ABI is passed to llvm.
2
3 // revisions:x86_64 i686 aarch64 arm riscv
4 //[x86_64] compile-flags: --target x86_64-unknown-uefi
5 //[x86_64] needs-llvm-components: aarch64 arm riscv
6 //[i686] compile-flags: --target i686-unknown-linux-musl
7 //[i686] needs-llvm-components: aarch64 arm riscv
8 //[aarch64] compile-flags: --target aarch64-unknown-none
9 //[aarch64] needs-llvm-components: aarch64 arm riscv
10 //[arm] compile-flags: --target armv7r-none-eabi
11 //[arm] needs-llvm-components: aarch64 arm riscv
12 //[riscv] compile-flags: --target riscv64gc-unknown-none-elf
13 //[riscv] needs-llvm-components: aarch64 arm riscv
14 // compile-flags: -C no-prepopulate-passes
15
16 #![crate_type = "lib"]
17 #![feature(no_core, lang_items)]
18 #![no_core]
19
20 #[lang="sized"]
21 trait Sized { }
22 #[lang="freeze"]
23 trait Freeze { }
24 #[lang="copy"]
25 trait Copy { }
26
27 //x86_64: define win64cc void @has_efiapi
28 //i686: define void @has_efiapi
29 //aarch64: define dso_local void @has_efiapi
30 //arm: define dso_local arm_aapcscc void @has_efiapi
31 //riscv: define dso_local void @has_efiapi
32 #[no_mangle]
33 pub extern "efiapi" fn has_efiapi() {}