about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-10-29 04:12:23 +0000
committerbors <bors@rust-lang.org>2019-10-29 04:12:23 +0000
commit2dd4e7320e620dc9a59423c55a7db3520ba8b553 (patch)
tree3fe15cf8b6933e3d09330cf8f17516a5abe0803c /src/test/codegen
parentcac68218105f1ba8b6a2a0b21b791951ff02f75d (diff)
parent46063ed23fbcd50a7723ee6008e6d63605789e24 (diff)
downloadrust-2dd4e7320e620dc9a59423c55a7db3520ba8b553.tar.gz
rust-2dd4e7320e620dc9a59423c55a7db3520ba8b553.zip
Auto merge of #65919 - Centril:rollup-qrgwnt6, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #65294 (Lint ignored `#[inline]` on function prototypes)
 - #65318 (Call out the types that are non local on E0117)
 - #65531 (Update backtrace to 0.3.40)
 - #65562 (Improve the "try using a variant of the expected type" hint.)
 - #65809 (Add new EFIAPI ABI)

Failed merges:

r? @ghost
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/abi-efiapi.rs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/codegen/abi-efiapi.rs b/src/test/codegen/abi-efiapi.rs
new file mode 100644
index 00000000000..72adb95e96a
--- /dev/null
+++ b/src/test/codegen/abi-efiapi.rs
@@ -0,0 +1,31 @@
+// Checks if the correct annotation for the efiapi ABI is passed to llvm.
+
+// revisions:x86_64 i686 aarch64 arm riscv
+
+// min-llvm-version 9.0
+
+//[x86_64] compile-flags: --target x86_64-unknown-uefi
+//[i686] compile-flags: --target i686-unknown-linux-musl
+//[aarch64] compile-flags: --target aarch64-unknown-none
+//[arm] compile-flags: --target armv7r-none-eabi
+//[riscv] compile-flags: --target riscv64gc-unknown-none-elf
+// compile-flags: -C no-prepopulate-passes
+
+#![crate_type = "lib"]
+#![feature(no_core, lang_items, abi_efiapi)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="freeze"]
+trait Freeze { }
+#[lang="copy"]
+trait Copy { }
+
+//x86_64: define win64cc void @has_efiapi
+//i686: define void @has_efiapi
+//aarch64: define void @has_efiapi
+//arm: define void @has_efiapi
+//riscv: define void @has_efiapi
+#[no_mangle]
+pub extern "efiapi" fn has_efiapi() {}