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,
487
487
b);
488
488
}
489
489
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
+
490
498
void IRGenModule::addSwiftSelfAttributes (llvm::AttributeList &attrs,
491
499
unsigned argIndex) {
492
500
llvm::AttrBuilder b;
@@ -1515,6 +1523,9 @@ void SignatureExpansion::expandExternalSignatureTypes() {
1515
1523
switch (FI.getExtParameterInfo (i).getABI ()) {
1516
1524
case clang::ParameterABI::Ordinary:
1517
1525
break ;
1526
+ case clang::ParameterABI::SwiftAsyncContext:
1527
+ IGM.addSwiftAsyncContextAttributes (Attrs, getCurParamIndex ());
1528
+ break ;
1518
1529
case clang::ParameterABI::SwiftContext:
1519
1530
IGM.addSwiftSelfAttributes (Attrs, getCurParamIndex ());
1520
1531
break ;
Original file line number Diff line number Diff line change @@ -1620,6 +1620,9 @@ private: \
1620
1620
// / Add the swiftself attribute.
1621
1621
void addSwiftSelfAttributes (llvm::AttributeList &attrs, unsigned argIndex);
1622
1622
1623
+ void addSwiftAsyncContextAttributes (llvm::AttributeList &attrs,
1624
+ unsigned argIndex);
1625
+
1623
1626
// / Add the swifterror attribute.
1624
1627
void addSwiftErrorAttributes (llvm::AttributeList &attrs, unsigned argIndex);
1625
1628
You can’t perform that action at this time.
0 commit comments