Skip to content

Commit c93356b

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 38e01a9 + ea74546 commit c93356b

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

lib/SIL/IR/SILArgument.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ SILArgument::SILArgument(ValueKind subClassKind,
3737
sharedUInt8().SILArgument.reborrow = reborrow;
3838
sharedUInt8().SILArgument.pointerEscape = pointerEscape;
3939
inputParentBlock->insertArgument(inputParentBlock->args_end(), this);
40+
ASSERT(!type.hasTypeParameter());
4041
}
4142

4243
SILFunction *SILArgument::getFunction() {

lib/SILGen/SILGenEpilog.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ void SILGenFunction::prepareEpilog(
8383
void SILGenFunction::prepareRethrowEpilog(
8484
DeclContext *dc, AbstractionPattern origErrorType, Type errorType,
8585
CleanupLocation cleanupLoc) {
86+
ASSERT(!errorType->hasPrimaryArchetype());
8687

8788
SILBasicBlock *rethrowBB = createBasicBlock(FunctionSection::Postmatter);
8889
if (!IndirectErrorResult) {
89-
SILType loweredErrorType = getLoweredType(origErrorType, errorType);
90+
auto errorTypeInContext = dc->mapTypeIntoContext(errorType);
91+
SILType loweredErrorType = getLoweredType(origErrorType, errorTypeInContext);
9092
rethrowBB->createPhiArgument(loweredErrorType, OwnershipKind::Owned);
9193
}
9294

stdlib/public/Distributed/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ else()
1616
set(swift_distributed_darwin_dependencies)
1717
endif()
1818

19+
if((SWIFT_BUILD_CLANG_OVERLAYS
20+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
21+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
22+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
23+
set(swift_distributed_dependencies _Builtin_float)
24+
else()
25+
set(swift_distributed_dependencies)
26+
endif()
27+
1928
set(swift_distributed_link_libraries
2029
swiftCore)
2130

@@ -30,6 +39,7 @@ add_swift_target_library(swiftDistributed ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS
3039
DistributedMetadata.swift
3140
LocalTestingDistributedActorSystem.swift
3241

42+
SWIFT_MODULE_DEPENDS ${swift_distributed_dependencies}
3343
SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_dependencies}
3444
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_dependencies}
3545
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_dependencies}

stdlib/public/Synchronization/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ if(SWIFT_BUILD_SDK_OVERLAY)
4141
set(SWIFT_SYNCHRONIZATION_DARWIN_DEPENDENCIES Darwin)
4242
endif()
4343

44+
set(SWIFT_SYNCHRONIZATION_DEPENDENCIES)
45+
if((SWIFT_BUILD_CLANG_OVERLAYS
46+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
47+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
48+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
49+
set(SWIFT_SYNCHRONIZATION_DEPENDENCIES _Builtin_float)
50+
endif()
51+
4452
set(SWIFT_SYNCHRONIZATION_DARWIN_SOURCES
4553
Mutex/DarwinImpl.swift
4654
Mutex/Mutex.swift
@@ -104,6 +112,8 @@ add_swift_target_library(swiftSynchronization ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES
104112
SWIFT_SOURCES_DEPENDS_FREESTANDING
105113
Mutex/MutexUnavailable.swift
106114

115+
SWIFT_MODULE_DEPENDS
116+
${SWIFT_SYNCHRONIZATION_DEPENDENCIES}
107117
SWIFT_MODULE_DEPENDS_OSX
108118
${SWIFT_SYNCHRONIZATION_DARWIN_DEPENDENCIES}
109119
SWIFT_MODULE_DEPENDS_IOS

test/SILGen/typed_throws_generic.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,3 +387,10 @@ extension ReducedError where T == MyError {
387387
throw MyError.fail
388388
}
389389
}
390+
391+
// https://github.com/swiftlang/swift/issues/74289
392+
struct LoadableGeneric<E>: Error {}
393+
394+
func throwsLoadableGeneric<E>(_: E) throws(LoadableGeneric<E>) {
395+
throw LoadableGeneric<E>()
396+
}

0 commit comments

Comments
 (0)