Skip to content

Commit 17d3bce

Browse files
committed
[Async CC] Add AsyncFunctionPointer to vtable.
1 parent 954fa87 commit 17d3bce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,8 +3119,13 @@ 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+
NotForDefinition);
3125+
} else {
3126+
ptr = IGM.getAddrOfSILFunction(entry->getImplementation(),
3127+
NotForDefinition);
3128+
}
31243129
} else {
31253130
// The method is removed by dead method elimination.
31263131
// It should be never called. We add a pointer to an error function.

0 commit comments

Comments
 (0)