Skip to content

Commit b34db5d

Browse files
committed
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.
1 parent 520636c commit b34db5d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/IRGen/GenConcurrency.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,8 @@ llvm::Function *IRGenModule::getAwaitAsyncContinuationFn() {
330330
llvm::Value *context = suspendFn->getArg(0);
331331
auto *call =
332332
Builder.CreateCall(getContinuationAwaitFunctionPointer(), {context});
333-
call->setDoesNotThrow();
334333
call->setCallingConv(SwiftAsyncCC);
334+
call->setDoesNotThrow();
335335
call->setTailCallKind(AsyncTailCallKind);
336336

337337
Builder.CreateRetVoid();

lib/IRGen/GenFunc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2541,8 +2541,8 @@ llvm::Function *IRGenFunction::createAsyncSuspendFn() {
25412541
auto *suspendCall = Builder.CreateCall(
25422542
IGM.getTaskSwitchFuncFunctionPointer(),
25432543
{context, resumeFunction, targetExecutorFirst, targetExecutorSecond});
2544-
suspendCall->setDoesNotThrow();
25452544
suspendCall->setCallingConv(IGM.SwiftAsyncCC);
2545+
suspendCall->setDoesNotThrow();
25462546
suspendCall->setTailCallKind(IGM.AsyncTailCallKind);
25472547

25482548
llvm::AttributeList attrs = suspendCall->getAttributes();

0 commit comments

Comments
 (0)