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