IRGen: order properties on SwiftAsyncCC to be uniform

Adjust the IRGen to always set the calling convention and then the
noexcept bit.  This makes it easier to quickly scan through the
attributes for the async calls which was useful for some Concurrency
related work on Windows.
This commit is contained in:
Saleem Abdulrasool
2023-02-14 08:22:02 -08:00
parent 520636c22a
commit b34db5d19e
2 changed files with 2 additions and 2 deletions

View File

@@ -330,8 +330,8 @@ llvm::Function *IRGenModule::getAwaitAsyncContinuationFn() {
llvm::Value *context = suspendFn->getArg(0);
auto *call =
Builder.CreateCall(getContinuationAwaitFunctionPointer(), {context});
call->setDoesNotThrow();
call->setCallingConv(SwiftAsyncCC);
call->setDoesNotThrow();
call->setTailCallKind(AsyncTailCallKind);
Builder.CreateRetVoid();

View File

@@ -2541,8 +2541,8 @@ llvm::Function *IRGenFunction::createAsyncSuspendFn() {
auto *suspendCall = Builder.CreateCall(
IGM.getTaskSwitchFuncFunctionPointer(),
{context, resumeFunction, targetExecutorFirst, targetExecutorSecond});
suspendCall->setDoesNotThrow();
suspendCall->setCallingConv(IGM.SwiftAsyncCC);
suspendCall->setDoesNotThrow();
suspendCall->setTailCallKind(IGM.AsyncTailCallKind);
llvm::AttributeList attrs = suspendCall->getAttributes();