File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -487,6 +487,14 @@ static void addIndirectResultAttributes(IRGenModule &IGM,
487487 b);
488488}
489489
490+ void IRGenModule::addSwiftAsyncContextAttributes (llvm::AttributeList &attrs,
491+ unsigned argIndex) {
492+ llvm::AttrBuilder b;
493+ b.addAttribute (llvm::Attribute::SwiftAsync);
494+ attrs = attrs.addAttributes (this ->getLLVMContext (),
495+ argIndex + llvm::AttributeList::FirstArgIndex, b);
496+ }
497+
490498void IRGenModule::addSwiftSelfAttributes (llvm::AttributeList &attrs,
491499 unsigned argIndex) {
492500 llvm::AttrBuilder b;
@@ -1515,6 +1523,9 @@ void SignatureExpansion::expandExternalSignatureTypes() {
15151523 switch (FI.getExtParameterInfo (i).getABI ()) {
15161524 case clang::ParameterABI::Ordinary:
15171525 break ;
1526+ case clang::ParameterABI::SwiftAsyncContext:
1527+ IGM.addSwiftAsyncContextAttributes (Attrs, getCurParamIndex ());
1528+ break ;
15181529 case clang::ParameterABI::SwiftContext:
15191530 IGM.addSwiftSelfAttributes (Attrs, getCurParamIndex ());
15201531 break ;
Original file line number Diff line number Diff line change @@ -1620,6 +1620,9 @@ private: \
16201620 // / Add the swiftself attribute.
16211621 void addSwiftSelfAttributes (llvm::AttributeList &attrs, unsigned argIndex);
16221622
1623+ void addSwiftAsyncContextAttributes (llvm::AttributeList &attrs,
1624+ unsigned argIndex);
1625+
16231626 // / Add the swifterror attribute.
16241627 void addSwiftErrorAttributes (llvm::AttributeList &attrs, unsigned argIndex);
16251628
You can’t perform that action at this time.
0 commit comments