From 877400dd12c47eaaef118fe9658eeb7d829bcf96 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 17 Jun 2018 22:22:30 +0100 Subject: Scope to use flags rathers than booleans --- src/ir_print.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 880e9d5ef..88b172d7f 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -863,8 +863,7 @@ void ir_print_value(irFileBuffer *f, irModule *m, irValue *value, Type *type_hin Scope *scope = e->scope; bool in_global_scope = false; if (scope != nullptr) { - // TODO(bill): Fix this rule. What should it be? - in_global_scope = scope->is_global || scope->is_init; + in_global_scope = (scope->flags & ScopeFlag_Global) != 0; } ir_print_encoded_global(f, ir_get_global_name(m, value), in_global_scope); break; @@ -1753,8 +1752,7 @@ void print_llvm_ir(irGen *ir) { bool in_global_scope = false; if (scope != nullptr) { // TODO(bill): Fix this rule. What should it be? - in_global_scope = scope->is_global || scope->is_init; - // in_global_scope = value->Global.name_is_not_mangled; + in_global_scope = (scope->flags & ScopeFlag_Global) != 0; } ir_print_encoded_global(f, ir_get_global_name(m, v), in_global_scope); -- cgit v1.2.3