From 517bdea7549453d958c31cf2af5dc298ea5508a9 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 26 Jun 2019 16:27:24 -0400 Subject: [PATCH] fix incorrectly omitting variable declarations in non-debug modes --- src/codegen.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/codegen.cpp b/src/codegen.cpp index 7601008e1..8842e161c 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3373,9 +3373,6 @@ static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, IrI if (!type_has_bits(var->var_type)) return nullptr; - if (var->ref_count == 0 && g->build_mode != BuildModeDebug) - return nullptr; - var->value_ref = ir_llvm_value(g, instruction->var_ptr); gen_var_debug_decl(g, var); return nullptr;