From c8333d0cc9a2941ea35f1202073dabd9058beebc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 3 Nov 2016 14:13:57 -0400 Subject: add concept of inline for, inline while, inline var --- src/codegen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 4b98153e94..9f19279bfc 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4105,7 +4105,7 @@ static void build_all_basic_blocks(CodeGen *g, FnTableEntry *fn) { static void gen_global_var(CodeGen *g, VariableTableEntry *var, LLVMValueRef init_val, TypeTableEntry *type_entry) { - assert(var->is_const); + assert(var->gen_is_const); assert(var->import); assert(type_entry); bool is_local_to_unit = true; @@ -4183,12 +4183,12 @@ static void do_code_gen(CodeGen *g) { LLVMSetUnnamedAddr(global_value, true); // TODO debug info for function pointers - if (var->is_const && var->type->id != TypeTableEntryIdFn) { + if (var->gen_is_const && var->type->id != TypeTableEntryIdFn) { gen_global_var(g, var, init_val, var->type); } } - LLVMSetGlobalConstant(global_value, var->is_const); + LLVMSetGlobalConstant(global_value, var->gen_is_const); var->value_ref = global_value; } -- cgit v1.2.3