diff options
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index a5374eb2de..ef910bbba7 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -612,6 +612,8 @@ static LLVMValueRef gen_fn_call_expr(CodeGen *g, AstNode *node) { return LLVMBuildUnreachable(g->builder); } else if (first_arg_ret) { return node->data.fn_call_expr.tmp_ptr; + } else if (src_return_type->size_in_bits == 0) { + return nullptr; } else { return result; } @@ -2767,6 +2769,7 @@ static void do_code_gen(CodeGen *g) { } VariableTableEntry *variable = param_decl->data.param_decl.variable; + assert(variable); LLVMZigDILocation *debug_loc = LLVMZigGetDebugLoc(param_decl->line + 1, param_decl->column + 1, fn_def_node->data.fn_def.block_context->di_scope); |
