fix not fully resolving debug info for structs causing llvm error

This commit is contained in:
Andrew Kelley
2019-08-29 10:24:24 -04:00
parent 834a789bb9
commit 94bbb46ca6
4 changed files with 33 additions and 1 deletions

View File

@@ -7208,6 +7208,12 @@ static void do_code_gen(CodeGen *g) {
LLVMSetModuleInlineAsm(g->module, buf_ptr(&g->global_asm));
}
while (g->type_resolve_stack.length != 0) {
ZigType *ty = g->type_resolve_stack.last();
if (type_resolve(g, ty, ResolveStatusLLVMFull))
zig_unreachable();
}
ZigLLVMDIBuilderFinalize(g->dbuilder);
if (g->verbose_llvm_ir) {