aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-11-11 22:09:53 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-11-11 22:11:22 -0500
commitbf8870a60bb35062b2b25867a0f9a95f6f5397ce (patch)
treef41b3b32de3644dd3f15eaa94be23e330521fea3 /src/codegen.cpp
parent5502160bd23f14b91ac2bd3726a93bdd0b40cc53 (diff)
downloadzig-bf8870a60bb35062b2b25867a0f9a95f6f5397ce.tar.gz
zig-bf8870a60bb35062b2b25867a0f9a95f6f5397ce.zip
fix unresolved type making it to codegen
found this trying to build oxid
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 4861def16c..a2fc0c0687 100644
--- 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) {