mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add Builtin.hopToActor
SILGen this builtin to a mandatory hop_to_executor with an actor type
operand.
e.g.
Task.detached {
Builtin.hopToActor(MainActor.shared)
await suspend()
}
Required to fix a bug in _runAsyncMain.
This commit is contained in:
@@ -2154,6 +2154,8 @@ public:
|
||||
}
|
||||
|
||||
void visitHopToExecutorInst(HopToExecutorInst *HTEI) {
|
||||
if (HTEI->isMandatory())
|
||||
*this << "[mandatory] ";
|
||||
*this << getIDAndType(HTEI->getTargetExecutor());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user