[Concurrency] Implement a builtin createAsyncTask() to create a new task.

`Builtin.createAsyncTask` takes flags, an optional parent task, and an
async/throwing function to execute, and passes it along to the
`swift_task_create_f` entry point to create a new (potentially child)
task, returning the new task and its initial context.
This commit is contained in:
Doug Gregor
2020-11-07 21:21:16 -08:00
parent b43eab419a
commit 4c2c2f32e9
16 changed files with 171 additions and 7 deletions

View File

@@ -1800,6 +1800,7 @@ static void visitBuiltinAddress(BuiltinInst *builtin,
case BuiltinValueKind::IntInstrprofIncrement:
case BuiltinValueKind::TSanInoutAccess:
case BuiltinValueKind::CancelAsyncTask:
case BuiltinValueKind::CreateAsyncTask:
return;
// General memory access to a pointer in first operand position.