AstGen: represent global variables directly

Rather than with `block_inline_var`. This matches how function
declarations work and how extern variables work.
This commit is contained in:
Andrew Kelley
2021-04-29 19:56:01 -07:00
parent 86d564eed8
commit 8944240aec
4 changed files with 30 additions and 25 deletions

View File

@@ -3478,7 +3478,7 @@ fn semaDecl(mod: *Module, decl: *Decl) !bool {
}
return type_changed or is_inline != prev_is_inline;
} else {
const is_mutable = zir_tags[zir_block_index] == .block_inline_var;
const is_mutable = decl_tv.val.tag() == .variable;
var is_threadlocal = false; // TODO implement threadlocal variables
var is_extern = false; // TODO implement extern variables