From 46033a2128b09ed15f38f6ed2602bf80989a770f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 22 Dec 2016 00:46:17 -0500 Subject: pass void parameters test --- src/codegen.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 49a6f4739b..b28b370f9a 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -1650,6 +1650,9 @@ static LLVMValueRef ir_render_switch_br(CodeGen *g, IrExecutable *executable, Ir } static LLVMValueRef ir_render_phi(CodeGen *g, IrExecutable *executable, IrInstructionPhi *instruction) { + if (!type_has_bits(instruction->base.type_entry)) + return nullptr; + LLVMTypeRef phi_type; if (handle_is_ptr(instruction->base.type_entry)) { phi_type = LLVMPointerType(instruction->base.type_entry->type_ref, 0); -- cgit v1.2.3