Skip to content

Commit b676a98

Browse files
committed
[Async CC] Add AsyncFunctionPointer to wtable.
1 parent 660f74b commit b676a98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/IRGen/GenProto.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,11 @@ class AccessorConformanceInfo : public ConformanceInfo {
13361336
SILFunction *Func = entry.getMethodWitness().Witness;
13371337
llvm::Constant *witness = nullptr;
13381338
if (Func) {
1339-
witness = IGM.getAddrOfSILFunction(Func, NotForDefinition);
1339+
if (Func->isAsync()) {
1340+
witness = IGM.getAddrOfAsyncFunctionPointer(Func);
1341+
} else {
1342+
witness = IGM.getAddrOfSILFunction(Func, NotForDefinition);
1343+
}
13401344
} else {
13411345
// The method is removed by dead method elimination.
13421346
// It should be never called. We add a pointer to an error function.

0 commit comments

Comments
 (0)