Skip to content

Commit c2b3be4

Browse files
authored
Merge pull request #34750 from nate-chandler/concurrency/irgen/rdar70597390
[Async CC] Unroll workaround where @main was async.
2 parents 390dd28 + 357988e commit c2b3be4

File tree

38 files changed

+42
-87
lines changed

38 files changed

+42
-87
lines changed

lib/IRGen/IRGenFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class IRGenFunction {
8383
OptimizationMode Mode = OptimizationMode::NotSet,
8484
const SILDebugScope *DbgScope = nullptr,
8585
Optional<SILLocation> DbgLoc = None);
86-
virtual ~IRGenFunction();
86+
~IRGenFunction();
8787

8888
void unimplemented(SourceLoc Loc, StringRef Message);
8989

@@ -128,9 +128,9 @@ class IRGenFunction {
128128
CoroutineHandle = handle;
129129
}
130130

131-
virtual llvm::Value *getAsyncTask();
132-
virtual llvm::Value *getAsyncExecutor();
133-
virtual llvm::Value *getAsyncContext();
131+
llvm::Value *getAsyncTask();
132+
llvm::Value *getAsyncExecutor();
133+
llvm::Value *getAsyncContext();
134134

135135
llvm::Function *getOrCreateResumePrjFn();
136136
llvm::Function *createAsyncDispatchFn(const FunctionPointer &fnPtr,

lib/IRGen/IRGenSIL.cpp

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -856,42 +856,6 @@ class IRGenSILFunction :
856856
}
857857
}
858858

859-
llvm::Value *getAsyncTask() override {
860-
// FIXME: (1) Remove this override, (2) mark the IRGenFunction::getAsyncTask
861-
// declaration as non-virtual, and (3) mark IRGenFunction's
862-
// destructor non-virtual once Task.runDetached is available.
863-
// rdar://problem/70597390*/
864-
if (CurSILFn->getLoweredFunctionType()->getRepresentation() ==
865-
SILFunctionTypeRepresentation::CFunctionPointer) {
866-
return llvm::Constant::getNullValue(IGM.SwiftTaskPtrTy);
867-
}
868-
return IRGenFunction::getAsyncTask();
869-
}
870-
871-
llvm::Value *getAsyncExecutor() override {
872-
// FIXME: (1) Remove this override, (2) mark the
873-
// IRGenFunction::getAsyncExecutor declaration as non-virtual, and
874-
// (3) mark IRGenFunction's destructor non-virtual once
875-
// Task.runDetached is available. rdar://problem/70597390*/
876-
if (CurSILFn->getLoweredFunctionType()->getRepresentation() ==
877-
SILFunctionTypeRepresentation::CFunctionPointer) {
878-
return llvm::Constant::getNullValue(IGM.SwiftExecutorPtrTy);
879-
}
880-
return IRGenFunction::getAsyncExecutor();
881-
}
882-
883-
llvm::Value *getAsyncContext() override {
884-
// FIXME: (1) Remove this override, (2) mark the
885-
// IRGenFunction::getAsyncContext declaration as non-virtual, and
886-
// (3) mark IRGenFunction's destructor non-virtual once
887-
// Task.runDetached is available. rdar://problem/70597390*/
888-
if (CurSILFn->getLoweredFunctionType()->getRepresentation() ==
889-
SILFunctionTypeRepresentation::CFunctionPointer) {
890-
return llvm::Constant::getNullValue(IGM.SwiftContextPtrTy);
891-
}
892-
return IRGenFunction::getAsyncContext();
893-
}
894-
895859
//===--------------------------------------------------------------------===//
896860
// SIL instruction lowering
897861
//===--------------------------------------------------------------------===//
@@ -1440,11 +1404,7 @@ std::unique_ptr<COrObjCEntryPointArgumentEmission>
14401404
getCOrObjCEntryPointArgumentEmission(IRGenSILFunction &IGF,
14411405
SILBasicBlock &entry,
14421406
Explosion &allParamValues) {
1443-
if (IGF.CurSILFn->isAsync() &&
1444-
!(/*FIXME: Remove this condition once Task.runDetached is
1445-
available. rdar://problem/70597390*/
1446-
IGF.CurSILFn->getLoweredFunctionType()->getRepresentation() ==
1447-
SILFunctionTypeRepresentation::CFunctionPointer)) {
1407+
if (IGF.CurSILFn->isAsync()) {
14481408
llvm_unreachable("unsupported");
14491409
} else {
14501410
return std::make_unique<SyncCOrObjCEntryPointArgumentEmission>(
@@ -3250,12 +3210,7 @@ static void emitReturnInst(IRGenSILFunction &IGF,
32503210
auto &retTI = cast<LoadableTypeInfo>(IGF.getTypeInfo(resultTy));
32513211
retTI.initialize(IGF, result, IGF.IndirectReturn, false);
32523212
IGF.Builder.CreateRetVoid();
3253-
} else if (IGF.isAsync() &&
3254-
!(/*FIXME: Remove this condition once Task.runDetached is
3255-
available. rdar://problem/70597390*/
3256-
IGF.CurSILFn->getLoweredFunctionType()
3257-
->getRepresentation() ==
3258-
SILFunctionTypeRepresentation::CFunctionPointer)) {
3213+
} else if (IGF.isAsync()) {
32593214
// If we're generating an async function, store the result into the buffer.
32603215
assert(!IGF.IndirectReturn.isValid() &&
32613216
"Formally direct results should stay direct results for async "

test/IRGen/async/run-call-classinstance-int64-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ sil @test_case : $@convention(thin) @async () -> () {
105105
return %void : $()
106106
}
107107

108-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
108+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
109109
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
110110

111111
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-classinstance-void-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ sil @test_case : $@convention(thin) @async () -> () {
103103
return %void : $()
104104
}
105105

106-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
106+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
107107
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
108108

109109
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-existential-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ sil @test_case : $@convention(thin) @async () -> () {
8181
return %void : $()
8282
}
8383

84-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
84+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
8585
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
8686

8787
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-generic-to-generic.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ sil @test_case : $@convention(thin) @async () -> () {
5353
return %void : $()
5454
}
5555

56-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
56+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
5757
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
5858

5959
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-generic-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4444
return %void : $()
4545
}
4646

47-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
47+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
4848
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
4949

5050
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-genericEquatable-x2-to-bool.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ sil @test_case : $@convention(thin) @async () -> () {
6161
return %void : $()
6262
}
6363

64-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
64+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
6565
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
6666

6767
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-int64-and-int64-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4646
return %void : $()
4747
}
4848

49-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
49+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
5050
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
5151

5252
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-int64-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4343
return %void : $()
4444
}
4545

46-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
46+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
4747
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
4848

4949
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-protocolextension_instance-void-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ sil @test_case : $@convention(thin) @async () -> () {
8282
return %void : $()
8383
}
8484

85-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
85+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
8686
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
8787

8888
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-protocolwitness_instance-void-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ sil @test_case : $@convention(thin) @async () -> () {
7373
return %void : $()
7474
}
7575

76-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
76+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7777
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7878

7979
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4040
return %out : $()
4141
}
4242

43-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
43+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
4444
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
4545

4646
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-struct_five_bools-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ sil @test_case : $@async @convention(thin) () -> () {
6565
return %result : $()
6666
}
6767

68-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
68+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
6969
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7070

7171
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-structinstance-int64-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sil @test_case : $@convention(thin) @async () -> () {
6666
return %void : $()
6767
}
6868

69-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
69+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7070
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7171

7272
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-throws-to-int-throwing.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ sil @test_case : $@convention(thin) @async () -> () {
127127
return %void : $()
128128
}
129129

130-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
130+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
131131
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
132132

133133
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-nothrow_call-sync-throw.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ sil @test_case : $@convention(thin) @async () -> () {
150150
return %void : $()
151151
}
152152

153-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
153+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
154154
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
155155

156156
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-throw.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ sil @test_case : $@convention(thin) @async () -> () {
137137
return %void : $()
138138
}
139139

140-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
140+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
141141
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
142142

143143
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-nothrow_call-async-throw.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ sil @test_case : $@convention(thin) @async () -> () {
151151
return %void : $()
152152
}
153153

154-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
154+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
155155
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
156156

157157
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-throw.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ sil @test_case : $@convention(thin) @async () -> () {
137137
return %void : $()
138138
}
139139

140-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
140+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
141141
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
142142

143143
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-to-existential.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ sil @test_case : $@convention(thin) @async () -> () {
8585
return %void : $()
8686
}
8787

88-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
88+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
8989
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
9090

9191
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-to-int64-and-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4848
return %void : $()
4949
}
5050

51-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
51+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
5252
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
5353

5454
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sil @test_case : $@convention(thin) @async () -> () {
4242
return %void : $()
4343
}
4444

45-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
45+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
4646
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
4747

4848
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call-void-to-struct_large.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ sil @test_case : $@convention(thin) @async () -> () {
136136
return %void : $()
137137
}
138138

139-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
139+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
140140
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
141141

142142
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call_generic-protocolwitness_instance-generic-to-int64-and-generic.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ sil @test_case : $@convention(thin) @async () -> () {
9595
return %void : $()
9696
}
9797

98-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
98+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
9999
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
100100

101101
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-call_generic-protocolwitness_instance-void-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ sil @test_case : $@convention(thin) @async () -> () {
8282
return %void : $()
8383
}
8484

85-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
85+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
8686
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
8787

8888
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-convertfunction-int64-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ failure(%error : $Error):
4646
unreachable
4747
}
4848

49-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
49+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
5050
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
5151

5252
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-class-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ sil @test_case : $@convention(thin) @async () -> () {
9696
return %void : $()
9797
}
9898

99-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
99+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
100100
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
101101

102102
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-generic_conformer-and-generic-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ sil @test_case : $@convention(thin) @async () -> () {
8787
return %void : $()
8888
}
8989

90-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
90+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
9191
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
9292

9393
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-inout-generic-and-in-generic-to-generic.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ sil @test_case : $@convention(thin) @async () -> () {
7171
return %void : $()
7272
}
7373

74-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
74+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7575
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7676

7777
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-int64-int64-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ sil @test_case : $@convention(thin) @async () -> () {
7373
return %void : $()
7474
}
7575

76-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
76+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7777
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7878

7979
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-int64-to-generic.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sil @test_case : $@convention(thin) @async () -> () {
6666
return %void : $()
6767
}
6868

69-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
69+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7070
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7171

7272
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-struct_classinstance_classinstance-and-int64-to-int64.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ sil @test_case : $@convention(thin) @async () -> () {
108108
return %void : $()
109109
}
110110

111-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
111+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
112112
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
113113

114114
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-structgeneric_classinstance_to_struct_and_error.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ bb_finish:
102102
return %void : $()
103103
}
104104

105-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
105+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
106106
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
107107

108108
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-structgeneric_polymorphic_constrained-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ sil @test_case : $@convention(thin) @async () -> () {
7070
return %void : $()
7171
}
7272

73-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
73+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7474
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
7575

7676
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

test/IRGen/async/run-partialapply-capture-type_structgeneric_polymorphic_constrained-to-void.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ sil @test_case : $@convention(thin) @async () -> () {
7575
return %void : $()
7676
}
7777

78-
sil @main : $@async @convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
78+
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
7979
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
8080

8181
%2 = function_ref @test_case : $@convention(thin) @async () -> ()

0 commit comments

Comments
 (0)