Files
zig/src
yvt d3ebd42865 Support taking extern pointers at comptime
This commit makes it possible to obtain pointers to `extern` variables
at comptime.

 - `ir_get_var_ptr` employs several checks to determine if the given
   variable is eligible for obtaining its pointer at comptime. This
   commit alters these checks to consider `extern` variables, which have
   runtime values, as eligible.

 - After this change, it's now possible for `render_const_val` to be
   called for `extern` variables. This commit modifies
   `render_const_val` to suppress the value generation for `extern`
   variables.

 - `do_code_gen` now creates `ZigValue::llvm_global` of `extern`
   variables before iterating through module-level variables so that
   other module-level variables can refer to them.

This solution is incomplete since there are several cases still
failing:

 - `global_var.array[n..m]`
 - `&global_var.array[i]`
 - `&global_var.inner_struct.value`
 - `&global_array[i]`

Closes #5349
2020-07-24 13:33:17 -07:00
..
2019-04-04 22:07:15 -04:00
2019-04-04 22:07:15 -04:00
2018-09-05 23:23:11 -04:00
2019-09-22 15:58:57 -04:00
2020-02-10 21:08:08 -05:00
2016-09-19 11:54:01 -04:00
2020-02-16 19:16:08 -05:00
2020-02-10 21:08:08 -05:00
2020-02-10 21:08:08 -05:00
2020-02-10 21:08:08 -05:00
2020-07-24 20:01:18 +00:00
2020-02-10 21:08:08 -05:00
2020-02-10 21:08:08 -05:00
2020-02-10 21:08:08 -05:00
2020-06-15 22:21:01 +03:00
2020-06-15 18:38:41 +03:00
2020-07-12 07:35:34 +00:00
2020-07-24 20:01:18 +00:00
2020-07-24 20:01:18 +00:00
2020-07-24 20:01:18 +00:00
2020-05-17 12:18:53 -04:00
2020-02-16 19:16:08 -05:00
2020-07-24 20:01:18 +00:00
2018-10-27 11:35:01 -04:00
2020-02-16 13:25:30 -05:00