Skip to content

Commit ed5001c

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 3624201 + c5be31d commit ed5001c

38 files changed

+64
-8
lines changed

test/IRGen/async/builtins.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc,CHECK-%target-ptrsize
22
// RUN: %target-swift-frontend -disable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native,CHECK-%target-ptrsize
33

4-
// REQUIRES: concurrency
4+
// REQUIRES: concurrency, objc_codegen
55
// XFAIL: CPU=arm64e
66

77
sil_stage canonical

test/IRGen/async/get_async_continuation.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -g -enable-objc-interop -primary-file %s -emit-irgen -sil-verify-all | %IRGenFileCheck %s
22
// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all
33

4-
// REQUIRES: concurrency
4+
// REQUIRES: concurrency, objc_codegen
55

66
import Builtin
77
import Swift

test/IRGen/async/partial_apply_forwarder.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -g -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc
22
// RUN: %target-swift-frontend -g -disable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native
33

4-
// REQUIRES: concurrency
4+
// REQUIRES: concurrency, objc_codegen
55

66
sil_stage canonical
77

test/IRGen/c_functions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu -check-prefix %target-abi-%target-cpu
3+
// REQUIRES: objc_codegen
34

45
// This is deliberately not a SIL test so that we can test SILGen too.
56

test/IRGen/c_layout.sil

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,22 @@ bb0:
337337
// CHECK-s390x-LABEL: declare{{( dllimport)?}} signext i32 @ints(i32 signext)
338338
// CHECK-s390x-LABEL: declare{{( dllimport)?}} zeroext i32 @unsigneds(i32 zeroext)
339339

340+
// CHECK-wasm32-LABEL: define swiftcc void @testIntegerExtension(i8 %0, i8 %1, i8 %2, i16 %3, i16 %4, i32 %5, i32 %6) #0 {
341+
// CHECK-wasm32: call signext i8 @chareth(i8 signext %0)
342+
// CHECK-wasm32: call signext i8 @signedChareth(i8 signext %1)
343+
// CHECK-wasm32: call zeroext i8 @unsignedChareth(i8 zeroext %2)
344+
// CHECK-wasm32: call signext i16 @eatMyShorts(i16 signext %3)
345+
// CHECK-wasm32: call zeroext i16 @eatMyUnsignedShorts(i16 zeroext %4)
346+
// CHECK-wasm32: call i32 @ints(i32 %5)
347+
// CHECK-wasm32: call i32 @unsigneds(i32 %6)
348+
// CHECK-wasm32-LABEL: declare signext i8 @chareth(i8 signext) #0
349+
// CHECK-wasm32-LABEL: declare signext i8 @signedChareth(i8 signext) #0
350+
// CHECK-wasm32-LABEL: declare zeroext i8 @unsignedChareth(i8 zeroext) #0
351+
// CHECK-wasm32-LABEL: declare signext i16 @eatMyShorts(i16 signext) #0
352+
// CHECK-wasm32-LABEL: declare zeroext i16 @eatMyUnsignedShorts(i16 zeroext) #0
353+
// CHECK-wasm32-LABEL: declare i32 @ints(i32) #0
354+
// CHECK-wasm32-LABEL: declare i32 @unsigneds(i32) #0
355+
340356
sil @testIntegerExtension : $@convention(thin) (CChar, CSignedChar, CUnsignedChar, CShort, CUnsignedShort, CInt, CUnsignedInt) -> () {
341357
entry(%a : $CChar, %b : $CSignedChar, %c : $CUnsignedChar, %d : $CShort, %e : $CUnsignedShort, %f : $CInt, %g : $CUnsignedInt):
342358
%h = function_ref @chareth : $@convention(c) (CChar) -> CChar

test/IRGen/clang_empty_type.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -emit-ir -verify -enable-objc-interop -import-objc-header %S/Inputs/clang_empty_type.h %s
2+
// REQUIRES: objc_codegen
23

34
public func projectTrailingArray(x: inout TrailingArray) {
45
x.size = 2

test/IRGen/clang_inline_opt.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %target-swift-frontend -enable-objc-interop -import-objc-header %S/Inputs/c_functions.h -primary-file %s -O -emit-ir -disable-llvm-optzns | %FileCheck %s
2+
// REQUIRES: objc_codegen
23

34
func return10() -> UInt32 {
45
return return7() + 3

test/IRGen/class_metadata.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{python} %utils/chex.py < %s > %t/class_metadata.swift
33
// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %t/class_metadata.swift -check-prefixes=CHECK,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-cpu -D#MDSIZE=7
44
// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s | %FileCheck %t/class_metadata.swift -check-prefixes=CHECK,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-cpu -D#MDSIZE=4
5+
// REQUIRES: objc_codegen
56

67
class A {}
78

test/IRGen/class_resilience.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// RUN: %target-swift-frontend -enable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-objc,CHECK-objc%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-%target-import-type-objc-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=7 -D#MDSIZE32=52 -D#MDSIZE64=80 -D#WORDSIZE=%target-alignment
77
// RUN: %target-swift-frontend -disable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-native,CHECK-native%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-native-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=4 -D#MDSIZE32=40 -D#MDSIZE64=56 -D#WORDSIZE=%target-alignment
88
// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %t/class_resilience.swift
9+
// REQUIRES: objc_codegen
910

1011
// CHECK: @"$s16class_resilience26ClassWithResilientPropertyC1s16resilient_struct4SizeVvpWvd" = hidden global [[INT]] 0
1112
// CHECK: @"$s16class_resilience26ClassWithResilientPropertyC5colors5Int32VvpWvd" = hidden global [[INT]] 0

test/IRGen/errors.sil

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ entry:
2525
// CHECK-LABEL-aarch64: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2626
// CHECK-LABEL-arm64_32: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2727
// CHECK-LABEL-arm64e: define{{( dllexport)?}}{{( protected)?}} swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
28+
// CHECK-LABEL-wasm32: define swiftcc void @does_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
2829
sil @does_throw : $@convention(thin) () -> @error Error {
2930
// CHECK: [[T0:%.*]] = call swiftcc ptr @create_error()
3031
%0 = function_ref @create_error : $@convention(thin) () -> @owned Error
@@ -49,6 +50,7 @@ sil @does_throw : $@convention(thin) () -> @error Error {
4950
// CHECK-LABEL-aarch64: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5051
// CHECK-LABEL-arm64e: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5152
// CHECK-LABEL-arm64_32: define{{( dllexport)?}}{{( protected)?}} swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
53+
// CHECK-LABEL-wasm32: define swiftcc void @doesnt_throw(ptr swiftself %0, ptr swifterror %1) {{.*}} {
5254
sil @doesnt_throw : $@convention(thin) () -> @error Error {
5355
// We don't have to do anything here because the caller always
5456
// zeroes the error slot before a call.
@@ -74,6 +76,7 @@ entry(%0 : $AnyObject):
7476
// CHECK-aarch64: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7577
// CHECK-arm64_32: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7678
// CHECK-powerpc64le: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
79+
// CHECK-wasm32: [[ERRORSLOT:%.*]] = alloca [[SWIFTERROR:.*]] ptr, align
7780
// CHECK-NEXT: store ptr null, ptr [[ERRORSLOT]], align
7881

7982
// CHECK-objc-NEXT: [[RESULT:%.*]] = call swiftcc ptr @try_apply_helper(ptr %0, ptr swiftself undef, ptr noalias nocapture [[SWIFTERROR]]{{( )?}}dereferenceable({{.}}) [[ERRORSLOT]])

0 commit comments

Comments
 (0)