commit bf8870a60bb35062b2b25867a0f9a95f6f5397ce (tree)
parent 5502160bd23f14b91ac2bd3726a93bdd0b40cc53
Author: Andrew Kelley <andrew@ziglang.org>
Date: Mon, 11 Nov 2019 22:09:53 -0500
fix unresolved type making it to codegen
found this trying to build oxid
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/codegen.cpp b/src/codegen.cpp
@@ -1699,6 +1699,10 @@ static void gen_var_debug_decl(CodeGen *g, ZigVar *var) {
}
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))
return nullptr;
if (!instruction->llvm_value) {