Skip to content

Commit 414a77d

Browse files
author
git apple-llvm automerger
committed
Merge commit '271ddc4d8e25' from apple/stable/20200714 into swift/release/5.4
2 parents 7202186 + 271ddc4 commit 414a77d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+550
-18
lines changed

clang/include/clang/AST/Attr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ class ParameterABIAttr : public InheritableParamAttr {
194194
switch (getKind()) {
195195
case attr::SwiftContext:
196196
return ParameterABI::SwiftContext;
197+
case attr::SwiftAsyncContext:
198+
return ParameterABI::SwiftAsyncContext;
197199
case attr::SwiftErrorResult:
198200
return ParameterABI::SwiftErrorResult;
199201
case attr::SwiftIndirectResult:

clang/include/clang/Basic/Attr.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2332,6 +2332,11 @@ def SwiftContext : ParameterABIAttr {
23322332
let Documentation = [SwiftContextDocs];
23332333
}
23342334

2335+
def SwiftAsyncContext : ParameterABIAttr {
2336+
let Spellings = [Clang<"swift_async_context">];
2337+
let Documentation = [SwiftAsyncContextDocs];
2338+
}
2339+
23352340
def SwiftErrorResult : ParameterABIAttr {
23362341
let Spellings = [Clang<"swift_error_result">];
23372342
let Documentation = [SwiftErrorResultDocs];

clang/include/clang/Basic/AttrDocs.td

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4092,6 +4092,19 @@ A context parameter must have pointer or reference type.
40924092
}];
40934093
}
40944094

4095+
def SwiftAsyncContextDocs : Documentation {
4096+
let Category = DocCatVariable;
4097+
let Content = [{
4098+
The ``swift_async_context`` attribute marks a parameter as having the
4099+
special asynchronous context-parameter ABI treatment.
4100+
4101+
This treatment generally passes the context value in a special register
4102+
which is normally callee-preserved.
4103+
4104+
A context parameter must have pointer or reference type.
4105+
}];
4106+
}
4107+
40954108
def SwiftErrorResultDocs : Documentation {
40964109
let Category = DocCatVariable;
40974110
let Content = [{

clang/include/clang/Basic/Specifiers.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,12 @@ namespace clang {
361361
/// This parameter (which must have pointer type) uses the special
362362
/// Swift context-pointer ABI treatment. There can be at
363363
/// most one parameter on a given function that uses this treatment.
364-
SwiftContext
364+
SwiftContext,
365+
366+
/// This parameter (which must have pointer type) uses the special
367+
/// Swift asynchronous context-pointer ABI treatment. There can be at
368+
/// most one parameter on a given function that uses this treatment.
369+
SwiftAsyncContext,
365370
};
366371

367372
/// Assigned inheritance model for a class in the MS C++ ABI. Must match order

clang/lib/AST/ItaniumMangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,7 @@ CXXNameMangler::mangleExtParameterInfo(FunctionProtoType::ExtParameterInfo PI) {
29122912

29132913
// All of these start with "swift", so they come before "ns_consumed".
29142914
case ParameterABI::SwiftContext:
2915+
case ParameterABI::SwiftAsyncContext:
29152916
case ParameterABI::SwiftErrorResult:
29162917
case ParameterABI::SwiftIndirectResult:
29172918
mangleVendorQualifier(getParameterABISpelling(PI.getABI()));

clang/lib/AST/TypePrinter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ StringRef clang::getParameterABISpelling(ParameterABI ABI) {
807807
llvm_unreachable("asking for spelling of ordinary parameter ABI");
808808
case ParameterABI::SwiftContext:
809809
return "swift_context";
810+
case ParameterABI::SwiftAsyncContext:
811+
return "swift_async_context";
810812
case ParameterABI::SwiftErrorResult:
811813
return "swift_error_result";
812814
case ParameterABI::SwiftIndirectResult:

clang/lib/CodeGen/CGCall.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,10 @@ void CodeGenModule::ConstructAttributeList(
22832283
case ParameterABI::SwiftContext:
22842284
Attrs.addAttribute(llvm::Attribute::SwiftSelf);
22852285
break;
2286+
2287+
case ParameterABI::SwiftAsyncContext:
2288+
Attrs.addAttribute(llvm::Attribute::SwiftAsync);
2289+
break;
22862290
}
22872291

22882292
if (FI.getExtParameterInfo(ArgNo).isNoEscape())

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4795,6 +4795,14 @@ void Sema::AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI,
47954795
D->addAttr(::new (Context) SwiftContextAttr(Context, CI));
47964796
return;
47974797

4798+
case ParameterABI::SwiftAsyncContext:
4799+
if (!isValidSwiftContextType(type)) {
4800+
Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type)
4801+
<< getParameterABISpelling(abi) << /*pointer to pointer */ 0 << type;
4802+
}
4803+
D->addAttr(::new (Context) SwiftAsyncContextAttr(Context, CI));
4804+
return;
4805+
47984806
case ParameterABI::SwiftErrorResult:
47994807
if (!isValidSwiftErrorResultType(type)) {
48004808
Diag(CI.getLoc(), diag::err_swift_abi_parameter_wrong_type)
@@ -7838,6 +7846,9 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
78387846
case ParsedAttr::AT_SwiftContext:
78397847
S.AddParameterABIAttr(D, AL, ParameterABI::SwiftContext);
78407848
break;
7849+
case ParsedAttr::AT_SwiftAsyncContext:
7850+
S.AddParameterABIAttr(D, AL, ParameterABI::SwiftAsyncContext);
7851+
break;
78417852
case ParsedAttr::AT_SwiftErrorResult:
78427853
S.AddParameterABIAttr(D, AL, ParameterABI::SwiftErrorResult);
78437854
break;

clang/lib/Sema/SemaType.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2716,6 +2716,10 @@ static void checkExtParameterInfos(Sema &S, ArrayRef<QualType> paramTypes,
27162716
checkForSwiftCC(paramIndex);
27172717
continue;
27182718

2719+
case ParameterABI::SwiftAsyncContext:
2720+
// FIXME: might want to require swiftasynccc when it exists
2721+
continue;
2722+
27192723
// swift_error parameters must be preceded by a swift_context parameter.
27202724
case ParameterABI::SwiftErrorResult:
27212725
checkForSwiftCC(paramIndex);

clang/test/CodeGen/arm-swiftcall.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define OUT __attribute__((swift_indirect_result))
77
#define ERROR __attribute__((swift_error_result))
88
#define CONTEXT __attribute__((swift_context))
9+
#define ASYNC_CONTEXT __attribute__((swift_async_context))
910

1011
/*****************************************************************************/
1112
/****************************** PARAMETER ABIS *******************************/
@@ -53,6 +54,9 @@ void test_context_error_1() {
5354
SWIFTCALL void context_error_2(short s, CONTEXT int *self, ERROR float **error) {}
5455
// CHECK-LABEL: define {{.*}} void @context_error_2(i16{{.*}}, i32* swiftself{{.*}}, float** swifterror %0)
5556

57+
SWIFTCALL void async_context_1(ASYNC_CONTEXT void *self) {}
58+
// CHECK-LABEL: define {{.*}} void @async_context_1(i8* swiftasync
59+
5660
/*****************************************************************************/
5761
/********************************** LOWERING *********************************/
5862
/*****************************************************************************/

clang/test/Misc/pragma-attribute-supported-attributes-list.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
// CHECK-NEXT: SetTypestate (SubjectMatchRule_function_is_member)
148148
// CHECK-NEXT: SpeculativeLoadHardening (SubjectMatchRule_function, SubjectMatchRule_objc_method)
149149
// CHECK-NEXT: SwiftAsync (SubjectMatchRule_function, SubjectMatchRule_objc_method)
150+
// CHECK-NEXT: SwiftAsyncContext (SubjectMatchRule_variable_is_parameter)
150151
// CHECK-NEXT: SwiftAsyncName (SubjectMatchRule_objc_method, SubjectMatchRule_function)
151152
// CHECK-NEXT: SwiftBridgedTypedef (SubjectMatchRule_type_alias)
152153
// CHECK-NEXT: SwiftContext (SubjectMatchRule_variable_is_parameter)

clang/test/Sema/attr-swiftcall.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define INDIRECT_RESULT __attribute__((swift_indirect_result))
66
#define ERROR_RESULT __attribute__((swift_error_result))
77
#define CONTEXT __attribute__((swift_context))
8+
#define ASYNC_CONTEXT __attribute__((swift_async_context))
89

910
int notAFunction SWIFTCALL; // expected-warning {{'swiftcall' only applies to function types; type here is 'int'}}
1011
void variadic(int x, ...) SWIFTCALL; // expected-error {{variadic function cannot use swiftcall calling convention}}
@@ -29,3 +30,8 @@ void context_nonswift(CONTEXT void *context); // expected-error {{'swift_context
2930
void context_bad_type(CONTEXT int context) SWIFTCALL; // expected-error {{'swift_context' parameter must have pointer type; type here is 'int'}}
3031
void context_okay(CONTEXT void *context) SWIFTCALL;
3132
void context_okay2(CONTEXT void *context, void *selfType, char **selfWitnessTable) SWIFTCALL;
33+
34+
void async_context_okay_for_now(ASYNC_CONTEXT void *context);
35+
void async_context_bad_type(ASYNC_CONTEXT int context) SWIFTCALL; // expected-error {{'swift_async_context' parameter must have pointer type; type here is 'int'}}
36+
void async_context_okay(ASYNC_CONTEXT void *context) SWIFTCALL;
37+
void async_context_okay2(ASYNC_CONTEXT void *context, void *selfType, char **selfWitnessTable) SWIFTCALL;

llvm/docs/LangRef.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,12 @@ Currently, only the following parameter attributes are defined:
12251225
a valid attribute for return values and can only be applied to one
12261226
parameter.
12271227

1228+
``swiftasync``
1229+
This indicates that the parameter is the asynchronous context parameter and
1230+
triggers the creation of a target-specific extended frame record to store
1231+
this pointer. This is not a valid attribute for return values and can only
1232+
be applied to one parameter.
1233+
12281234
``swifterror``
12291235
This attribute is motivated to model and optimize Swift error handling. It
12301236
can be applied to a parameter with pointer to pointer type or a
@@ -11616,6 +11622,29 @@ Note that calling this intrinsic does not prevent function inlining or
1161611622
other aggressive transformations, so the value returned may not be that
1161711623
of the obvious source-language caller.
1161811624

11625+
'``llvm.swift.async.context.addr``' Intrinsic
11626+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11627+
11628+
Syntax:
11629+
"""""""
11630+
11631+
::
11632+
11633+
declare i8** @llvm.swift.async.context.addr()
11634+
11635+
Overview:
11636+
"""""""""
11637+
11638+
The '``llvm.swift.async.context.addr``' intrinsic returns a pointer to
11639+
the part of the extended frame record containing the asynchronous
11640+
context of a Swift execution.
11641+
11642+
Semantics:
11643+
""""""""""
11644+
11645+
If the function has a ``swiftasync`` parameter, that argument will initially
11646+
be stored at the returned address. If not, it will be initialized to null.
11647+
1161911648
'``llvm.localescape``' and '``llvm.localrecover``' Intrinsics
1162011649
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1162111650

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ enum AttributeKindCodes {
644644
ATTR_KIND_NO_MERGE = 66,
645645
ATTR_KIND_NULL_POINTER_IS_VALID = 67,
646646
ATTR_KIND_NOUNDEF = 68,
647+
ATTR_KIND_SWIFT_ASYNC = 72,
647648
};
648649

649650
enum ComdatSelectionKindCodes {

llvm/include/llvm/CodeGen/TargetCallingConv.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ namespace ISD {
3838
unsigned IsPreallocated : 1; ///< ByVal without the copy
3939
unsigned IsSplitEnd : 1; ///< Last part of a split
4040
unsigned IsSwiftSelf : 1; ///< Swift self parameter
41+
unsigned IsSwiftAsync : 1; ///< Swift async context parameter
4142
unsigned IsSwiftError : 1; ///< Swift error parameter
4243
unsigned IsCFGuardTarget : 1; ///< Control Flow Guard target
4344
unsigned IsHva : 1; ///< HVA field for
@@ -58,11 +59,11 @@ namespace ISD {
5859
ArgFlagsTy()
5960
: IsZExt(0), IsSExt(0), IsInReg(0), IsSRet(0), IsByVal(0), IsNest(0),
6061
IsReturned(0), IsSplit(0), IsInAlloca(0), IsPreallocated(0),
61-
IsSplitEnd(0), IsSwiftSelf(0), IsSwiftError(0), IsCFGuardTarget(0),
62-
IsHva(0), IsHvaStart(0), IsSecArgPass(0), ByValAlign(0), OrigAlign(0),
63-
IsInConsecutiveRegsLast(0), IsInConsecutiveRegs(0),
64-
IsCopyElisionCandidate(0), IsPointer(0), ByValSize(0),
65-
PointerAddrSpace(0) {
62+
IsSplitEnd(0), IsSwiftSelf(0), IsSwiftAsync(0), IsSwiftError(0),
63+
IsCFGuardTarget(0), IsHva(0), IsHvaStart(0), IsSecArgPass(0),
64+
ByValAlign(0), OrigAlign(0), IsInConsecutiveRegsLast(0),
65+
IsInConsecutiveRegs(0), IsCopyElisionCandidate(0), IsPointer(0),
66+
ByValSize(0), PointerAddrSpace(0) {
6667
static_assert(sizeof(*this) == 3 * sizeof(unsigned), "flags are too big");
6768
}
6869

@@ -90,6 +91,9 @@ namespace ISD {
9091
bool isSwiftSelf() const { return IsSwiftSelf; }
9192
void setSwiftSelf() { IsSwiftSelf = 1; }
9293

94+
bool isSwiftAsync() const { return IsSwiftAsync; }
95+
void setSwiftAsync() { IsSwiftAsync = 1; }
96+
9397
bool isSwiftError() const { return IsSwiftError; }
9498
void setSwiftError() { IsSwiftError = 1; }
9599

llvm/include/llvm/CodeGen/TargetFrameLowering.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ class TargetFrameLowering {
156156
/// returns false, spill slots will be assigned using generic implementation.
157157
/// assignCalleeSavedSpillSlots() may add, delete or rearrange elements of
158158
/// CSI.
159+
virtual bool assignCalleeSavedSpillSlots(MachineFunction &MF,
160+
const TargetRegisterInfo *TRI,
161+
std::vector<CalleeSavedInfo> &CSI,
162+
unsigned &MinCSFrameIndex,
163+
unsigned &MaxCSFrameIndex) const {
164+
return assignCalleeSavedSpillSlots(MF, TRI, CSI);
165+
}
166+
159167
virtual bool
160168
assignCalleeSavedSpillSlots(MachineFunction &MF,
161169
const TargetRegisterInfo *TRI,

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ class TargetLoweringBase {
282282
bool IsPreallocated : 1;
283283
bool IsReturned : 1;
284284
bool IsSwiftSelf : 1;
285+
bool IsSwiftAsync : 1;
285286
bool IsSwiftError : 1;
286287
bool IsCFGuardTarget : 1;
287288
MaybeAlign Alignment = None;
@@ -292,7 +293,7 @@ class TargetLoweringBase {
292293
: IsSExt(false), IsZExt(false), IsInReg(false), IsSRet(false),
293294
IsNest(false), IsByVal(false), IsInAlloca(false),
294295
IsPreallocated(false), IsReturned(false), IsSwiftSelf(false),
295-
IsSwiftError(false), IsCFGuardTarget(false) {}
296+
IsSwiftAsync(false), IsSwiftError(false), IsCFGuardTarget(false) {}
296297

297298
void setAttributes(const CallBase *Call, unsigned ArgIdx);
298299
};

llvm/include/llvm/IR/Attributes.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ def SwiftError : EnumAttr<"swifterror">;
220220
/// Argument is swift self/context.
221221
def SwiftSelf : EnumAttr<"swiftself">;
222222

223+
/// Argument is swift async context.
224+
def SwiftAsync : EnumAttr<"swiftasync">;
225+
223226
/// Function must be in a unwind table.
224227
def UWTable : EnumAttr<"uwtable">;
225228

llvm/include/llvm/IR/Intrinsics.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,12 @@ def int_objc_arc_annotation_bottomup_bbstart : Intrinsic<[],
444444
def int_objc_arc_annotation_bottomup_bbend : Intrinsic<[],
445445
[llvm_ptrptr_ty,
446446
llvm_ptrptr_ty]>;
447+
//===--------------- Swift asynchronous context intrinsics ----------------===//
447448

449+
// Returns the location of the Swift asynchronous context (usually stored just
450+
// before the frame pointer), and triggers the creation of a null context if it
451+
// would otherwise be unneeded.
452+
def int_swift_async_context_addr : Intrinsic<[llvm_ptrptr_ty], [], [IntrNoMem]>;
448453

449454
//===--------------------- Code Generator Intrinsics ----------------------===//
450455
//

llvm/include/llvm/Target/TargetCallingConv.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class CCIfPreallocated<CCAction A> : CCIf<"ArgFlags.isPreallocated()", A> {
5151
class CCIfSwiftSelf<CCAction A> : CCIf<"ArgFlags.isSwiftSelf()", A> {
5252
}
5353

54+
/// CCIfSwiftAsync - If the current argument has swiftasync parameter attribute,
55+
/// apply Action A.
56+
class CCIfSwiftAsync<CCAction A> : CCIf<"ArgFlags.isSwiftAsync()", A> {
57+
}
58+
5459
/// CCIfSwiftError - If the current argument has swifterror parameter attribute,
5560
/// apply Action A.
5661
class CCIfSwiftError<CCAction A> : CCIf<"ArgFlags.isSwiftError()", A> {

llvm/lib/AsmParser/LLLexer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ lltok::Kind LLLexer::LexIdentifier() {
692692
KEYWORD(speculative_load_hardening);
693693
KEYWORD(swifterror);
694694
KEYWORD(swiftself);
695+
KEYWORD(swiftasync);
695696
KEYWORD(uwtable);
696697
KEYWORD(willreturn);
697698
KEYWORD(writeonly);

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,7 @@ bool LLParser::ParseFnAttributeValuePairs(AttrBuilder &B,
13811381
case lltok::kw_sret:
13821382
case lltok::kw_swifterror:
13831383
case lltok::kw_swiftself:
1384+
case lltok::kw_swiftasync:
13841385
case lltok::kw_immarg:
13851386
HaveError |=
13861387
Error(Lex.getLoc(),
@@ -1692,6 +1693,7 @@ bool LLParser::ParseOptionalParamAttrs(AttrBuilder &B) {
16921693
case lltok::kw_sret: B.addAttribute(Attribute::StructRet); break;
16931694
case lltok::kw_swifterror: B.addAttribute(Attribute::SwiftError); break;
16941695
case lltok::kw_swiftself: B.addAttribute(Attribute::SwiftSelf); break;
1696+
case lltok::kw_swiftasync: B.addAttribute(Attribute::SwiftAsync); break;
16951697
case lltok::kw_writeonly: B.addAttribute(Attribute::WriteOnly); break;
16961698
case lltok::kw_zeroext: B.addAttribute(Attribute::ZExt); break;
16971699
case lltok::kw_immarg: B.addAttribute(Attribute::ImmArg); break;
@@ -1794,6 +1796,7 @@ bool LLParser::ParseOptionalReturnAttrs(AttrBuilder &B) {
17941796
case lltok::kw_sret:
17951797
case lltok::kw_swifterror:
17961798
case lltok::kw_swiftself:
1799+
case lltok::kw_swiftasync:
17971800
case lltok::kw_immarg:
17981801
HaveError |= Error(Lex.getLoc(), "invalid use of parameter-only attribute");
17991802
break;

llvm/lib/AsmParser/LLToken.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ enum Kind {
235235
kw_strictfp,
236236
kw_swifterror,
237237
kw_swiftself,
238+
kw_swiftasync,
238239
kw_uwtable,
239240
kw_willreturn,
240241
kw_writeonly,

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
15161516
return Attribute::SwiftError;
15171517
case bitc::ATTR_KIND_SWIFT_SELF:
15181518
return Attribute::SwiftSelf;
1519+
case bitc::ATTR_KIND_SWIFT_ASYNC:
1520+
return Attribute::SwiftAsync;
15191521
case bitc::ATTR_KIND_UW_TABLE:
15201522
return Attribute::UWTable;
15211523
case bitc::ATTR_KIND_WILLRETURN:

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
717717
return bitc::ATTR_KIND_SWIFT_ERROR;
718718
case Attribute::SwiftSelf:
719719
return bitc::ATTR_KIND_SWIFT_SELF;
720+
case Attribute::SwiftAsync:
721+
return bitc::ATTR_KIND_SWIFT_ASYNC;
720722
case Attribute::UWTable:
721723
return bitc::ATTR_KIND_UW_TABLE;
722724
case Attribute::WillReturn:

llvm/lib/CodeGen/GlobalISel/CallLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ void CallLowering::setArgFlags(CallLowering::ArgInfo &Arg, unsigned OpIdx,
9393
Flags.setSRet();
9494
if (Attrs.hasAttribute(OpIdx, Attribute::SwiftSelf))
9595
Flags.setSwiftSelf();
96+
if (Attrs.hasAttribute(OpIdx, Attribute::SwiftAsync))
97+
Flags.setSwiftAsync();
9698
if (Attrs.hasAttribute(OpIdx, Attribute::SwiftError))
9799
Flags.setSwiftError();
98100
if (Attrs.hasAttribute(OpIdx, Attribute::ByVal))

0 commit comments

Comments
 (0)