diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-01 02:00:25 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-01 02:00:25 -0700 |
| commit | b3459f64e795118c4c12890ed0fec75638b74a2c (patch) | |
| tree | d5730790d1b61f71a606e30023d68cc36071cce4 /src/codegen.cpp | |
| parent | 6b2e29c6ac58d5f4370828bfa0f54b83d1931a97 (diff) | |
| download | zig-b3459f64e795118c4c12890ed0fec75638b74a2c.tar.gz zig-b3459f64e795118c4c12890ed0fec75638b74a2c.zip | |
parseh understands macros which alias global fn ptr vars
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); |
