Skip to content

Commit 3cb8969

Browse files
authored
Merge pull request #83479 from MaxDesiatov/initializeWithCopy-type-mismatch
2 parents e2ad4a9 + 9a1a60e commit 3cb8969

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

include/swift/ABI/Task.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ struct ResultTypeInfo {
241241
#else
242242
size_t size = 0;
243243
size_t alignMask = 0;
244-
void (*initializeWithCopy)(OpaqueValue *result, OpaqueValue *src) = nullptr;
244+
OpaqueValue * (*initializeWithCopy)(OpaqueValue *result, OpaqueValue *src, void *type) = nullptr;
245245
void (*storeEnumTagSinglePayload)(OpaqueValue *v, unsigned whichCase,
246246
unsigned emptyCases) = nullptr;
247247
void (*destroy)(OpaqueValue *, void *) = nullptr;
@@ -256,7 +256,7 @@ struct ResultTypeInfo {
256256
return alignMask + 1;
257257
}
258258
void vw_initializeWithCopy(OpaqueValue *result, OpaqueValue *src) {
259-
initializeWithCopy(result, src);
259+
initializeWithCopy(result, src, nullptr);
260260
}
261261
void vw_storeEnumTagSinglePayload(OpaqueValue *v, unsigned whichCase,
262262
unsigned emptyCases) {

include/swift/ABI/TaskOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ class ResultTypeInfoTaskOptionRecord : public TaskOptionRecord {
215215
size_t size;
216216
size_t alignMask;
217217

218-
void (*__ptrauth_swift_value_witness_function_pointer(
218+
OpaqueValue *(*__ptrauth_swift_value_witness_function_pointer(
219219
SpecialPointerAuthDiscriminators::InitializeWithCopy)
220-
initializeWithCopy)(OpaqueValue *, OpaqueValue *);
220+
initializeWithCopy)(OpaqueValue *, OpaqueValue *, void *);
221221

222222
void (*__ptrauth_swift_value_witness_function_pointer(
223223
SpecialPointerAuthDiscriminators::StoreEnumTagSinglePayload)

test/embedded/concurrency-actors.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
3-
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos -lswift_Concurrency -lswift_ConcurrencyDefaultExecutor -dead_strip
3+
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple %target-clang-resource-dir-opt -lswift_Concurrency %target-swift-default-executor-opt -dead_strip
44
// RUN: %target-run %t/a.out | %FileCheck %s
55

66
// REQUIRES: executable_test
77
// REQUIRES: swift_in_compiler
88
// REQUIRES: optimized_stdlib
9-
// REQUIRES: OS=macosx
9+
// REQUIRES: OS=macosx || OS=wasip1
1010
// REQUIRES: swift_feature_Embedded
1111

1212
import _Concurrency
@@ -64,7 +64,7 @@ actor Number {
6464
let n1 = await Number()
6565
await n1.task!.value
6666

67-
let n2 = await Number(iterations: 1000)
67+
let n2 = await Number(iterations: 500)
6868
let val = await n2.val
6969
guard val == 1 else {
7070
fatalError("wrong val setting")

test/embedded/concurrency-async-let.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
3-
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos -lswift_Concurrency -lswift_ConcurrencyDefaultExecutor -dead_strip
3+
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple %target-clang-resource-dir-opt -lswift_Concurrency %target-swift-default-executor-opt -dead_strip
44
// RUN: %target-run %t/a.out | %FileCheck %s
55

66
// REQUIRES: executable_test
77
// REQUIRES: swift_in_compiler
88
// REQUIRES: optimized_stdlib
9-
// REQUIRES: OS=macosx
9+
// REQUIRES: OS=macosx || OS=wasip1
1010
// REQUIRES: swift_feature_Embedded
1111

1212
import _Concurrency

test/embedded/concurrency-builtins.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// REQUIRES: swift_in_compiler
44
// REQUIRES: optimized_stdlib
5-
// REQUIRES: OS=macosx
5+
// REQUIRES: OS=macosx || OS=wasip1
66
// REQUIRES: swift_feature_Embedded
77

88
import Builtin

test/embedded/concurrency-currenttask.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
3-
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos -lswift_Concurrency -lswift_ConcurrencyDefaultExecutor -dead_strip
3+
// RUN: %target-clang %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple %target-clang-resource-dir-opt -lswift_Concurrency %target-swift-default-executor-opt -dead_strip
44
// RUN: %target-run %t/a.out | %FileCheck %s
55

66
// REQUIRES: executable_test
77
// REQUIRES: swift_in_compiler
88
// REQUIRES: optimized_stdlib
9-
// REQUIRES: OS=macosx
9+
// REQUIRES: OS=macosx || OS=wasip1
1010
// REQUIRES: swift_feature_Embedded
1111

1212
import _Concurrency

test/embedded/concurrency-leaks.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o -g -O
33
// RUN: %target-clang -x c -std=c11 -c %S/Inputs/debug-malloc.c -o %t/debug-malloc.o -g
4-
// RUN: %target-clang %t/a.o %t/debug-malloc.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%target-cpu-apple-macos -lswift_Concurrency -lswift_ConcurrencyDefaultExecutor -dead_strip -g
4+
// RUN: %target-clang %t/a.o %t/debug-malloc.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple %target-clang-resource-dir-opt %target-swift-default-executor-opt -lswift_Concurrency %target-swift-default-executor-opt -dead_strip -g
55
// RUN: %target-run %t/a.out | %FileCheck %s
66

77
// REQUIRES: executable_test
88
// REQUIRES: swift_in_compiler
99
// REQUIRES: optimized_stdlib
10-
// REQUIRES: OS=macosx
10+
// REQUIRES: OS=macosx || OS=wasip1
1111
// REQUIRES: swift_feature_Embedded
1212

1313
import _Concurrency

test/embedded/concurrency-simple.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -enable-experimental-feature Embedded -parse-as-library %s -c -o %t/a.o
3-
// RUN: %target-clang %target-clang-resource-dir-opt %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple -lc++ -lswift_Concurrency -lswift_ConcurrencyDefaultExecutor -dead_strip
3+
// RUN: %target-clang %target-clang-resource-dir-opt %t/a.o -o %t/a.out -L%swift_obj_root/lib/swift/embedded/%module-target-triple -lc++ -lswift_Concurrency %target-swift-default-executor-opt -dead_strip
44
// RUN: %target-run %t/a.out | %FileCheck %s
55

66
// REQUIRES: executable_test
77
// REQUIRES: swift_in_compiler
88
// REQUIRES: optimized_stdlib
9-
// REQUIRES: OS=macosx
9+
// REQUIRES: OS=macosx || OS=wasip1
1010
// REQUIRES: swift_feature_Embedded
1111

1212
import _Concurrency

0 commit comments

Comments
 (0)