mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
- Track the `VarPattern` instruction on the `VarStorage` instruction so that it's available for name mangling. - Mangle global variables based on the first binding name within their pattern. - Give global variables external rather than internal linkage, except if they have no bindings whatsoever in their pattern. - To support lowering references to bindings nested within a global var, such as for `var (x: i32, b: i32)`, add some basic initial support for reference constant expressions. Treat a global `var` as a reference constant, and treat an aggregate access into a reference constant as a reference constant.