mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SIL] Add flag to SILFunction to indicate async.
Includes boilerplate to parse and print as well as to serialize and deserialize.
This commit is contained in:
@@ -274,6 +274,9 @@ private:
|
||||
/// that it may have unboxed capture (i.e. @inout_aliasable parameters).
|
||||
unsigned IsWithoutActuallyEscapingThunk : 1;
|
||||
|
||||
/// True if this function is an async function.
|
||||
unsigned IsAsync : 1;
|
||||
|
||||
/// If != OptimizationMode::NotSet, the optimization mode specified with an
|
||||
/// function attribute.
|
||||
unsigned OptMode : NumOptimizationModeBits;
|
||||
@@ -501,6 +504,10 @@ public:
|
||||
IsWithoutActuallyEscapingThunk = val;
|
||||
}
|
||||
|
||||
bool isAsync() const { return IsAsync; }
|
||||
|
||||
void setAsync(bool val = true) { IsAsync = val; }
|
||||
|
||||
/// Returns the calling convention used by this entry point.
|
||||
SILFunctionTypeRepresentation getRepresentation() const {
|
||||
return getLoweredFunctionType()->getRepresentation();
|
||||
|
||||
Reference in New Issue
Block a user