fix unresolved type making it to codegen

found this trying to build oxid
master
Andrew Kelley 2019-11-11 22:09:53 -05:00
parent 5502160bd2
commit bf8870a60b
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 4 additions and 0 deletions

View File

@ -1699,6 +1699,10 @@ static void gen_var_debug_decl(CodeGen *g, ZigVar *var) {
} }
static LLVMValueRef ir_llvm_value(CodeGen *g, IrInstruction *instruction) { static LLVMValueRef ir_llvm_value(CodeGen *g, IrInstruction *instruction) {
Error err;
if ((err = type_resolve(g, instruction->value.type, ResolveStatusZeroBitsKnown))) {
codegen_report_errors_and_exit(g);
}
if (!type_has_bits(instruction->value.type)) if (!type_has_bits(instruction->value.type))
return nullptr; return nullptr;
if (!instruction->llvm_value) { if (!instruction->llvm_value) {