Skip to content

Commit 4492fee

Browse files
authored
Merge pull request #1195 from swiftwasm/release/5.3
[pull] swiftwasm-release/5.3 from release/5.3
2 parents 0386448 + 59c457b commit 4492fee

7 files changed

+23
-4
lines changed

lib/SIL/Verifier/SILVerifier.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ struct ImmutableAddressUseVerifier {
536536
case SILInstructionKind::FixLifetimeInst:
537537
case SILInstructionKind::KeyPathInst:
538538
case SILInstructionKind::SwitchEnumAddrInst:
539+
case SILInstructionKind::SelectEnumAddrInst:
539540
break;
540541
case SILInstructionKind::AddressToPointerInst:
541542
// We assume that the user is attempting to do something unsafe since we

test/SIL/memory_lifetime.sil

+17
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,20 @@ bb6(%45 : @owned $Error):
377377
br bb4(%45 : $Error)
378378
}
379379

380+
sil [ossa] @test_memory_lifetime_select_enum : $@convention(thin) (@in_guaranteed Optional<T>) -> () {
381+
bb0(%0 : $*Optional<T>):
382+
%2 = integer_literal $Builtin.Int1, 0
383+
%3 = integer_literal $Builtin.Int1, 1
384+
%4 = select_enum_addr %0 : $*Optional<T>, case #Optional.none!enumelt: %2, case #Optional.some!enumelt: %3 : $Builtin.Int1
385+
cond_br %4, bb1, bb2
386+
387+
bb1:
388+
br bb3
389+
390+
bb2:
391+
br bb3
392+
393+
bb3:
394+
%9999 = tuple()
395+
return %9999 : $()
396+
}

test/SourceKit/CodeComplete/complete_build_session.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// REQUIRES: rdar60881337
12
import Foo
23

34
func test() {

test/SourceKit/CodeComplete/complete_checkdeps_bridged.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func foo() {
3535
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
3636

3737
// RUN: -shell -- echo '### Modify bridging header library file' == \
38-
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/LocalCFunc.h %t/MyProject/ == \
3938
// RUN: -shell -- sleep $SLEEP_TIME == \
39+
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/LocalCFunc.h %t/MyProject/ == \
4040
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
4141

4242
// RUN: -shell -- echo '### Fast completion' == \

test/SourceKit/CodeComplete/complete_checkdeps_clangmodule.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func foo() {
3535
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
3636

3737
// RUN: -shell -- echo '### Modify framework (c)' == \
38-
// RUN: -shell -- cp -R $INPUT_DIR/ClangFW.framework_mod/* %t/Frameworks/ClangFW.framework/ == \
3938
// RUN: -shell -- sleep $SLEEP_TIME == \
39+
// RUN: -shell -- cp -R $INPUT_DIR/ClangFW.framework_mod/* %t/Frameworks/ClangFW.framework/ == \
4040
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
4141

4242
// RUN: -shell -- echo '### Fast completion' == \

test/SourceKit/CodeComplete/complete_checkdeps_otherfile.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func foo() {
3535
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
3636

3737
// RUN: -shell -- echo "### Modify local library file" == \
38-
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/Library.swift %t/MyProject/ == \
3938
// RUN: -shell -- sleep $SLEEP_TIME == \
39+
// RUN: -shell -- cp -R $INPUT_DIR/MyProject_mod/Library.swift %t/MyProject/ == \
4040
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
4141

4242
// RUN: -shell -- echo '### Fast completion' == \

test/SourceKit/CodeComplete/complete_checkdeps_swiftmodule.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ func foo() {
3535
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
3636

3737
// RUN: -shell -- echo '### Modify framework (s)' == \
38-
// RUN: -shell -- %target-swift-frontend -emit-module -module-name SwiftFW -o %t/Frameworks/SwiftFW.framework/Modules/SwiftFW.swiftmodule/%target-swiftmodule-name $INPUT_DIR/SwiftFW_src_mod/Funcs.swift == \
3938
// RUN: -shell -- sleep $SLEEP_TIME == \
39+
// RUN: -shell -- %target-swift-frontend -emit-module -module-name SwiftFW -o %t/Frameworks/SwiftFW.framework/Modules/SwiftFW.swiftmodule/%target-swiftmodule-name $INPUT_DIR/SwiftFW_src_mod/Funcs.swift == \
4040
// RUN: -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \
4141

4242
// RUN: -shell -- echo '### Fast completion' == \

0 commit comments

Comments
 (0)