ir: ability to modify global vars

This commit is contained in:
Andrew Kelley
2016-10-29 19:14:48 -04:00
parent 8e2804efa1
commit afc5507b64
5 changed files with 188 additions and 72 deletions

View File

@@ -2885,7 +2885,7 @@ static LLVMValueRef ir_render_var_ptr(CodeGen *g, IrExecutable *executable, IrIn
VariableTableEntry *var = instruction->var;
if (type_has_bits(var->type)) {
assert(var->value_ref);
return get_handle_value(g, var->value_ref, var->type);
return var->value_ref;
} else {
return nullptr;
}