aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp3
1 files changed, 3 insertions, 0 deletions
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);