Skip to content

Commit e4f71c8

Browse files
authored
stdlib: add support for WebAssembly in VarArgs (#39361)
When targeting `wasm32` we're relying on the alignment padding branch that's used for 32-bit ARM.
1 parent 140c024 commit e4f71c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/VarArgs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ final internal class __VaListBuilder {
601601
// supported vararg type is greater than the alignment of Int, such
602602
// as non-iOS ARM. Note that we can't use alignof because it
603603
// differs from ABI alignment on some architectures.
604-
#if (arch(arm) && !os(iOS)) || arch(arm64_32)
604+
#if (arch(arm) && !os(iOS)) || arch(arm64_32) || arch(wasm32)
605605
if let arg = arg as? _CVarArgAligned {
606606
let alignmentInWords = arg._cVarArgAlignment / MemoryLayout<Int>.size
607607
let misalignmentInWords = count % alignmentInWords

0 commit comments

Comments
 (0)