File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2624,7 +2624,16 @@ class AsyncCallEmission final : public CallEmission {
2624
2624
assert (currentResumeFn == nullptr );
2625
2625
currentResumeFn =
2626
2626
IGF.Builder .CreateIntrinsicCall (llvm::Intrinsic::coro_async_resume, {});
2627
- return currentResumeFn;
2627
+ auto signedResumeFn = currentResumeFn;
2628
+ // Sign the task resume function with the C function pointer schema.
2629
+ if (auto schema = IGF.IGM .getOptions ().PointerAuth .FunctionPointers ) {
2630
+ // TODO: use the Clang type for TaskContinuationFunction*
2631
+ // to make this work with type diversity.
2632
+ auto authInfo =
2633
+ PointerAuthInfo::emit (IGF, schema, nullptr , PointerAuthEntity ());
2634
+ signedResumeFn = emitPointerAuthSign (IGF, signedResumeFn, authInfo);
2635
+ }
2636
+ return signedResumeFn;
2628
2637
}
2629
2638
2630
2639
You can’t perform that action at this time.
0 commit comments