Skip to content

Commit 8e48f7e

Browse files
authored
Merge pull request #3600 from swiftwasm/release/5.5
2 parents f788f79 + 855e1e3 commit 8e48f7e

17 files changed

+54
-47
lines changed

include/swift/AST/DiagnosticsSIL.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,9 @@ WARNING(semantic_function_improper_nesting, none, "'@_semantics' function calls
668668

669669
// Capture promotion diagnostics
670670
WARNING(capturepromotion_concurrentcapture_mutation, none,
671-
"'%0' mutated after capture by concurrent closure", (StringRef))
671+
"'%0' mutated after capture by sendable closure", (StringRef))
672672
NOTE(capturepromotion_concurrentcapture_closure_here, none,
673-
"variable captured by concurrent closure", ())
673+
"variable captured by sendable closure", ())
674674
NOTE(capturepromotion_concurrentcapture_capturinguse_here, none,
675675
"capturing use", ())
676676
NOTE(capturepromotion_variable_defined_here,none,

include/swift/AST/DiagnosticsSema.def

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3837,28 +3837,28 @@ NOTE(silence_debug_description_in_interpolation_segment_call,none,
38373837
"use 'String(describing:)' to silence this warning", ())
38383838

38393839
NOTE(noescape_parameter,none,
3840-
"parameter %1 is implicitly %select{non-escaping|non-concurrent}0",
3840+
"parameter %1 is implicitly %select{non-escaping|non-sendable}0",
38413841
(unsigned, Identifier))
38423842
NOTE(generic_parameters_always_escaping,none,
38433843
"generic parameters are always considered '@escaping'", ())
38443844

38453845
ERROR(passing_noattrfunc_to_attrfunc,none,
3846-
"passing %select{non-escaping|non-concurrent}0 parameter %1 to function "
3846+
"passing %select{non-escaping|non-sendable}0 parameter %1 to function "
38473847
"expecting %select{an @escaping|a @Sendable}0 closure",
38483848
(unsigned, Identifier))
38493849
ERROR(converting_noespace_param_to_generic_type,none,
38503850
"converting non-escaping parameter %0 to generic parameter %1 may allow it to escape",
38513851
(Identifier, Type))
38523852
ERROR(assigning_noattrfunc_to_attrfunc,none,
3853-
"assigning %select{non-escaping|non-concurrent}0 parameter %1 to "
3853+
"assigning %select{non-escaping|non-sendable}0 parameter %1 to "
38543854
"%select{an @escaping|a @Sendable}0 closure",
38553855
(unsigned, Identifier))
38563856
ERROR(general_noattrfunc_to_attr,none,
3857-
"using %select{non-escaping|non-concurrent}0 parameter %1 in a context "
3857+
"using %select{non-escaping|non-sendable}0 parameter %1 in a context "
38583858
"expecting %select{an @escaping|a @Sendable}0 closure",
38593859
(unsigned, Identifier))
38603860
ERROR(converting_noattrfunc_to_type,none,
3861-
"converting %select{non-escaping|non-concurrent function}0 value to %1 "
3861+
"converting %select{non-escaping|non-sendable function}0 value to %1 "
38623862
"may %select{allow it to escape|introduce data races}0",
38633863
(unsigned, Type))
38643864

include/swift/Runtime/Concurrent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ template <class ElemTy> struct ConcurrentList {
6363

6464
/// Remove all of the links in the chain. This method leaves
6565
/// the list at a usable state and new links can be added.
66-
/// Notice that this operation is non-concurrent because
66+
/// Notice that this operation is non-sendable because
6767
/// we have no way of ensuring that no one is currently
6868
/// traversing the list.
6969
void clear() {

lib/Basic/Platform.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,27 +369,27 @@ swift::getSwiftRuntimeCompatibilityVersionForTarget(
369369
if (Triple.isMacOSX()) {
370370
Triple.getMacOSXVersion(Major, Minor, Micro);
371371

372-
auto floorFor64e = [&Triple](llvm::VersionTuple v) {
373-
if (Triple.getArchName() != "arm64e") return v;
374-
// macOS got first arm64e support in 11.0, i.e. VersionTuple(5, 3)
372+
auto floorFor64 = [&Triple](llvm::VersionTuple v) {
373+
if (!Triple.isAArch64()) return v;
374+
// macOS got first arm64(e) support in 11.0, i.e. VersionTuple(5, 3)
375375
return MAX(v, llvm::VersionTuple(5, 3));
376376
};
377377

378378
if (Major == 10) {
379379
if (Triple.isAArch64() && Minor <= 16)
380-
return floorFor64e(llvm::VersionTuple(5, 3));
380+
return floorFor64(llvm::VersionTuple(5, 3));
381381

382382
if (Minor <= 14) {
383-
return floorFor64e(llvm::VersionTuple(5, 0));
383+
return floorFor64(llvm::VersionTuple(5, 0));
384384
} else if (Minor <= 15) {
385385
if (Micro <= 3) {
386-
return floorFor64e(llvm::VersionTuple(5, 1));
386+
return floorFor64(llvm::VersionTuple(5, 1));
387387
} else {
388-
return floorFor64e(llvm::VersionTuple(5, 2));
388+
return floorFor64(llvm::VersionTuple(5, 2));
389389
}
390390
}
391391
} else if (Major == 11) {
392-
return floorFor64e(llvm::VersionTuple(5, 3));
392+
return floorFor64(llvm::VersionTuple(5, 3));
393393
}
394394
} else if (Triple.isiOS()) { // includes tvOS
395395
Triple.getiOSVersion(Major, Minor, Micro);

lib/Sema/CSDiagnostics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ class AttributedFuncToTypeConversionFailure final : public ContextualFailure {
728728
bool diagnoseAsError() override;
729729

730730
private:
731-
/// Emit tailored diagnostics for no-escape/non-concurrent parameter
731+
/// Emit tailored diagnostics for no-escape/non-sendable parameter
732732
/// conversions e.g. passing such parameter as an @escaping or @Sendable
733733
/// argument, or trying to assign it to a variable which expects @escaping
734734
/// or @Sendable function.

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ namespace {
18091809
}
18101810

18111811
if (result == AsyncMarkingResult::FoundAsync) {
1812-
// Check for non-concurrent types.
1812+
// Check for non-sendable types.
18131813
bool problemFound =
18141814
diagnoseNonConcurrentTypesInReference(
18151815
concDeclRef, getDeclContext(), declLoc,

lib/Sema/TypeCheckConcurrency.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void checkOverrideActorIsolation(ValueDecl *value);
200200
/// as async functions or actors.
201201
bool contextUsesConcurrencyFeatures(const DeclContext *dc);
202202

203-
/// Diagnose the presence of any non-concurrent types when referencing a
203+
/// Diagnose the presence of any non-sendable types when referencing a
204204
/// given declaration from a particular declaration context.
205205
///
206206
/// This function should be invoked any time that the given declaration

lib/Sema/TypeCheckProtocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2907,7 +2907,7 @@ bool ConformanceChecker::checkActorIsolation(
29072907
witnessGlobalActor->isEqual(requirementGlobalActor))
29082908
return false;
29092909

2910-
// For cross-actor references, check for non-concurrent types.
2910+
// For cross-actor references, check for non-sendable types.
29112911
if (isCrossActor) {
29122912
// If the requirement was imported from Objective-C, it may not have been
29132913
// annotated appropriately. Allow the mismatch.

test/ClangImporter/objc_async.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ func testSlowServerOldSchool(slowServer: SlowServer) {
9090
_ = slowServer.allOperations
9191
}
9292

93-
func testSendable(fn: () -> Void) { // expected-note{{parameter 'fn' is implicitly non-concurrent}}
93+
func testSendable(fn: () -> Void) { // expected-note{{parameter 'fn' is implicitly non-sendable}}
9494
doSomethingConcurrently(fn)
95-
// expected-error@-1{{passing non-concurrent parameter 'fn' to function expecting a @Sendable closure}}
95+
// expected-error@-1{{passing non-sendable parameter 'fn' to function expecting a @Sendable closure}}
9696
doSomethingConcurrentlyButUnsafe(fn) // okay, @Sendable not part of the type
9797

9898
var x = 17

test/Concurrency/Backdeploy/linking.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// RUN: otool -L %t/linking_rpath_old | %FileCheck -check-prefix CHECK-RPATH %s
99

1010
// REQUIRES: OS=macosx
11+
// REQUIRES: CPU=x86_64
1112

1213
// CHECK-DIRECT: /usr/lib/swift/libswift_Concurrency.dylib
1314
// CHECK-RPATH: @rpath/libswift_Concurrency.dylib

0 commit comments

Comments
 (0)