From d504318f2e0f3054c772abbd34f938f2cefa6ccc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 10 Jun 2019 23:54:28 -0400 Subject: remove the final legacy stack allocation --- src/codegen.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 5e3938a4ae..a75ef29169 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -6826,20 +6826,6 @@ static void do_code_gen(CodeGen *g) { get_ptr_align(g, ptr_type)); } - for (size_t alloca_i = 0; alloca_i < fn_table_entry->alloca_list.length; alloca_i += 1) { - IrInstruction *instruction = fn_table_entry->alloca_list.at(alloca_i); - LLVMValueRef *slot; - ZigType *slot_type = instruction->value.type; - uint32_t alignment_bytes = 0; - if (instruction->id == IrInstructionIdCast) { - IrInstructionCast *cast_instruction = (IrInstructionCast *)instruction; - slot = &cast_instruction->tmp_ptr; - } else { - zig_unreachable(); - } - *slot = build_alloca(g, slot_type, "", alignment_bytes); - } - ZigType *import = get_scope_import(&fn_table_entry->fndef_scope->base); unsigned gen_i_init = want_first_arg_sret(g, fn_type_id) ? 1 : 0; -- cgit v1.2.3