about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorDan Robertson <dan@dlrobertson.com>2018-12-05 02:44:08 +0000
committerDan Robertson <dan@dlrobertson.com>2018-12-07 22:54:56 +0000
commit3dfd8f7a64067d8b348ba597db10a06e2eccb773 (patch)
tree26939b48c8c82ebd9e0dd970fb81a001b42f0ff0 /src/libcore
parentfc84f5f837a3e1b9b9bc992dd603d3d968502288 (diff)
downloadrust-3dfd8f7a64067d8b348ba597db10a06e2eccb773.tar.gz
rust-3dfd8f7a64067d8b348ba597db10a06e2eccb773.zip
codegen: Fix va_list - aaarch64 iOS/Windows
According to the Apple developer docs:

> The type va_list is an alias for char * rather than for the struct
> type specified in the generic PCS.

The current implementation uses the generic Aarch64 structure for VaList
for Aarch64 iOS.

Windows always uses the char * variant of the va_list.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ffi.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/ffi.rs b/src/libcore/ffi.rs
index edeb3b0d368..60b8874bf76 100644
--- a/src/libcore/ffi.rs
+++ b/src/libcore/ffi.rs
@@ -45,6 +45,7 @@ impl fmt::Debug for c_void {
 /// Basic implementation of a `va_list`.
 #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
               not(target_arch = "x86_64")),
+          all(target_arch = "aarch4", target_os = "ios"),
           windows))]
 #[unstable(feature = "c_variadic",
            reason = "the `c_variadic` feature has not been properly tested on \
@@ -192,6 +193,7 @@ impl<'a> VaList<'a> {
             where F: for<'copy> FnOnce(VaList<'copy>) -> R {
         #[cfg(any(all(not(target_arch = "aarch64"), not(target_arch = "powerpc"),
                       not(target_arch = "x86_64")),
+                  all(target_arch = "aarch4", target_os = "ios"),
                   windows))]
         let mut ap = va_copy(self);
         #[cfg(all(any(target_arch = "aarch64", target_arch = "powerpc", target_arch = "x86_64"),