We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c09f54 commit e11fa2cCopy full SHA for e11fa2c
lib/IRGen/GenCall.cpp
@@ -5056,6 +5056,12 @@ StringRef FunctionPointer::getName(IRGenModule &IGM) const {
5056
return getRawPointer()->getName();
5057
case BasicKind::AsyncFunctionPointer: {
5058
auto *asyncFnPtr = getDirectPointer();
5059
+ // Handle windows style async function pointers.
5060
+ if (auto *ce = dyn_cast<llvm::ConstantExpr>(asyncFnPtr)) {
5061
+ if (ce->getOpcode() == Instruction::IntToPtr) {
5062
+ asyncFnPtr = cast<llvm::Constant>(asyncFnPtr->getOperand(0));
5063
+ }
5064
5065
asyncFnPtr = cast<llvm::Constant>(asyncFnPtr->stripPointerCasts());
5066
return IGM
5067
.getSILFunctionForAsyncFunctionPointer(asyncFnPtr)->getName();
0 commit comments