mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:10:12 +01:00
As suggested in [1], replace `FieldInitializerMap` with a `FieldStore`. The corresponding `FieldId` is now stored in `FieldDecl`. To make room for the `FieldId`, the `ElementIndex` is now stored in the `Field`, along with the initializer. In import_ref.cpp, resolving `FieldDecl` initializers is now supported, and in convert.cpp `LoadImportRef` is called to do so. The `field_initializer_import.carbon` test now passes. Printing a `FieldDecl` instruction now prints the initializer as well, if present. See field_initializer.carbon for an example. [1]: https://github.com/carbon-language/carbon-lang/pull/7238#discussion_r3283217158