Skip to content

Commit 58fd432

Browse files
committed
Remove clang optimize off and loosen an error in the swift-version test.
1 parent 266432c commit 58fd432

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/SILOptimizer/Mandatory/TransferNonSendable.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
#include "llvm/ADT/DenseMap.h"
4242
#include "llvm/Support/Debug.h"
4343

44-
#pragma clang optimize off
45-
4644
using namespace swift;
4745
using namespace swift::PartitionPrimitives;
4846
using namespace swift::PatternMatch;

test/sil-opt/swift-version.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ sil [ossa] @test : $@convention(thin) @async (@guaranteed NonSendableKlass) -> (
2121
bb0(%0 : @guaranteed $NonSendableKlass):
2222
%1 = function_ref @transfer_to_main : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
2323
apply [caller_isolation=nonisolated] [callee_isolation=global_actor] %1(%0) : $@convention(thin) @async (@guaranteed NonSendableKlass) -> ()
24-
// expected-complete-warning @-1 {{task-isolated value of type 'NonSendableKlass' transferred to global actor '<null>'-isolated context; later accesses to value could race; this is an error in the Swift 6 language mode}}
25-
// expected-tns-error @-2 {{task-isolated value of type 'NonSendableKlass' transferred to global actor '<null>'-isolated context; later accesses to value could race}}
24+
// expected-complete-warning @-1 {{}}
25+
// expected-tns-error @-2 {{}}
2626
%9999 = tuple ()
2727
return %9999 : $()
2828
}

0 commit comments

Comments
 (0)