diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-11-03 14:13:57 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-11-03 14:13:57 -0400 |
| commit | c8333d0cc9a2941ea35f1202073dabd9058beebc (patch) | |
| tree | 4af6d5e7611cfb3b1f24626a5c8618bde7550f78 /src/codegen.cpp | |
| parent | 1a0111d4c36578b64d8532724afd9be9ca61d3d1 (diff) | |
| download | zig-c8333d0cc9a2941ea35f1202073dabd9058beebc.tar.gz zig-c8333d0cc9a2941ea35f1202073dabd9058beebc.zip | |
add concept of inline for, inline while, inline var
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
