break the data dependencies that llvm coro transforms cant handle

my simple coro test program builds now

see #727
This commit is contained in:
Andrew Kelley
2018-02-28 16:47:13 -05:00
parent 026aebf2ea
commit ad2a29ccf2
4 changed files with 71 additions and 23 deletions

View File

@@ -3294,6 +3294,7 @@ static LLVMValueRef ir_render_cancel(CodeGen *g, IrExecutable *executable, IrIns
static LLVMValueRef ir_render_get_implicit_allocator(CodeGen *g, IrExecutable *executable,
IrInstructionGetImplicitAllocator *instruction)
{
assert(instruction->id == ImplicitAllocatorIdArg);
size_t allocator_arg_index = get_async_allocator_arg_index(g, &g->cur_fn->type_entry->data.fn.fn_type_id);
return LLVMGetParam(g->cur_fn_val, allocator_arg_index);
}