File tree 2 files changed +17
-0
lines changed 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -5901,6 +5901,11 @@ static bool verificationEnabled(const SILModule &M) {
5901
5901
if (M.getOptions ().VerifyAll )
5902
5902
return true ;
5903
5903
5904
+ // If we are emitting for Was, we always skip verification due to keypath issues.
5905
+ if (M.getASTContext ().LangOpts .Target .isWasm ()) {
5906
+ return false ;
5907
+ }
5908
+
5904
5909
#ifndef NDEBUG
5905
5910
// Otherwise if we do have asserts enabled, always verify...
5906
5911
return true ;
Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ void tryLockable(M &mutex) {
36
36
37
37
// We cannot lock a locked lock
38
38
ret = mutex.try_lock ();
39
+ #if SWIFT_THREADING_NONE
40
+ // Noop since none threading mode always succeeds getting lock
41
+ (void )ret;
42
+ #else
39
43
ASSERT_FALSE (ret);
44
+ #endif
40
45
41
46
mutex.unlock ();
42
47
}
@@ -61,6 +66,12 @@ void basicLockableThreaded(M &mutex) {
61
66
ASSERT_EQ (count2, 500 );
62
67
}
63
68
69
+ #if SWIFT_THREADING_NONE
70
+ template <typename M>
71
+ void lockableThreaded (M &mutex) {
72
+ // Noop since none threading mode always succeeds getting lock
73
+ }
74
+ #else
64
75
// More extensive tests
65
76
template <typename M>
66
77
void lockableThreaded (M &mutex) {
@@ -90,6 +101,7 @@ void lockableThreaded(M &mutex) {
90
101
ASSERT_EQ (count1, 500 );
91
102
ASSERT_EQ (count2, 500 );
92
103
}
104
+ #endif
93
105
94
106
// Test a scoped lock implementation
95
107
template <typename SL, typename M>
You can’t perform that action at this time.
0 commit comments