fix crash when passing void to var args function

closes #235
This commit is contained in:
Andrew Kelley
2017-01-31 15:50:38 -05:00
parent b258fdb532
commit 88a253c64d
5 changed files with 43 additions and 8 deletions

View File

@@ -3738,6 +3738,9 @@ static void init(CodeGen *g, Buf *source_path) {
g->invalid_instruction = allocate<IrInstruction>(1);
g->invalid_instruction->value.type = g->builtin_types.entry_invalid;
g->const_void_val.special = ConstValSpecialStatic;
g->const_void_val.type = g->builtin_types.entry_void;
}
void codegen_parseh(CodeGen *g, Buf *src_dirname, Buf *src_basename, Buf *source_code) {