]> git.proxmox.com Git - rustc.git/blob - src/test/codegen/abi-efiapi.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / src / test / 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 // needs-llvm-components: aarch64 arm riscv
5
6 //[x86_64] compile-flags: --target x86_64-unknown-uefi
7 //[i686] compile-flags: --target i686-unknown-linux-musl
8 //[aarch64] compile-flags: --target aarch64-unknown-none
9 //[arm] compile-flags: --target armv7r-none-eabi
10 //[riscv] compile-flags: --target riscv64gc-unknown-none-elf
11 // compile-flags: -C no-prepopulate-passes
12
13 #![crate_type = "lib"]
14 #![feature(no_core, lang_items, abi_efiapi)]
15 #![no_core]
16
17 #[lang="sized"]
18 trait Sized { }
19 #[lang="freeze"]
20 trait Freeze { }
21 #[lang="copy"]
22 trait Copy { }
23
24 //x86_64: define win64cc void @has_efiapi
25 //i686: define void @has_efiapi
26 //aarch64: define dso_local void @has_efiapi
27 //arm: define dso_local void @has_efiapi
28 //riscv: define dso_local void @has_efiapi
29 #[no_mangle]
30 pub extern "efiapi" fn has_efiapi() {}