mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 18:14:58 +01:00
Import generics and specifics when they are referenced by imported entities. When importing a generic, we import the symbolic constants required by its eval block, and then rebuild the eval block itself given the list of constants it needs to compute. This is likely a bit less efficient than directly importing the contents of the eval block, but avoids needing to either extend the importer code to be able to import the instructions that can appear in the eval block or extend the evaluator to cope with instructions from a different `SemIR::File`. Importing a symbolic constant is unaffected, and does not yet preserve the associated generic and index within that generic, so uses of a generic from an imported IR still don't pick up values from the specific, but the improved functionality can be seen in the changes to the SemIR in the testcases.