aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-26 16:27:24 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-26 16:27:24 -0400
commit517bdea7549453d958c31cf2af5dc298ea5508a9 (patch)
treefc1bdbf059e9bf9e99b212aae3056ed0e87e7e77
parent3085d29af83d07769582f751b3c2f5f36634e34b (diff)
downloadzig-517bdea7549453d958c31cf2af5dc298ea5508a9.tar.gz
zig-517bdea7549453d958c31cf2af5dc298ea5508a9.zip
fix incorrectly omitting variable declarations
in non-debug modes
-rw-r--r--src/codegen.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 7601008e16..8842e161cc 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;