aboutsummaryrefslogtreecommitdiff
path: root/src/ir_print.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-06-17 22:22:30 +0100
committergingerBill <bill@gingerbill.org>2018-06-17 22:22:30 +0100
commit877400dd12c47eaaef118fe9658eeb7d829bcf96 (patch)
treee31a189750dd8b0f56dc0cecd7a71da1bbc53f84 /src/ir_print.cpp
parenta4e3201113311b338c563d169cac59aaf9cf6335 (diff)
Scope to use flags rathers than booleans
Diffstat (limited to 'src/ir_print.cpp')
-rw-r--r--src/ir_print.cpp6
1 files changed, 2 insertions, 4 deletions
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);