Skip to content

Commit 660f74b

Browse files
committed
[Async CC] Add AsyncFunctionPointer to vtable.
1 parent 2d21932 commit 660f74b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,8 +3119,12 @@ namespace {
31193119
// The class is fragile. Emit a direct reference to the vtable entry.
31203120
llvm::Constant *ptr;
31213121
if (entry) {
3122-
ptr = IGM.getAddrOfSILFunction(entry->getImplementation(),
3123-
NotForDefinition);
3122+
if (entry->getImplementation()->isAsync()) {
3123+
ptr = IGM.getAddrOfAsyncFunctionPointer(entry->getImplementation());
3124+
} else {
3125+
ptr = IGM.getAddrOfSILFunction(entry->getImplementation(),
3126+
NotForDefinition);
3127+
}
31243128
} else {
31253129
// The method is removed by dead method elimination.
31263130
// It should be never called. We add a pointer to an error function.

0 commit comments

Comments
 (0)