fix crash when incomplete struct used as argument

closes #107
This commit is contained in:
Andrew Kelley
2016-02-02 19:09:53 -07:00
parent 79adf55699
commit 8058b5e0a9
3 changed files with 70 additions and 1 deletions

View File

@@ -2830,6 +2830,7 @@ static void do_code_gen(CodeGen *g) {
arg_no = var->gen_arg_index + 1;
var->is_ptr = false;
assert(var->gen_arg_index >= 0);
var->value_ref = LLVMGetParam(fn, var->gen_arg_index);
} else {
tag = LLVMZigTag_DW_auto_variable();