fix incorrectly omitting variable declarations

in non-debug modes
This commit is contained in:
Andrew Kelley 2019-06-26 16:27:24 -04:00
parent 3085d29af8
commit 517bdea754
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -3373,9 +3373,6 @@ static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, IrI
if (!type_has_bits(var->var_type)) if (!type_has_bits(var->var_type))
return nullptr; return nullptr;
if (var->ref_count == 0 && g->build_mode != BuildModeDebug)
return nullptr;
var->value_ref = ir_llvm_value(g, instruction->var_ptr); var->value_ref = ir_llvm_value(g, instruction->var_ptr);
gen_var_debug_decl(g, var); gen_var_debug_decl(g, var);
return nullptr; return nullptr;