mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 20:15:48 +01:00
A `MetaInstId` is intended to represent a handle to an instruction in a generic as an operand to a template action; substituting into the action should not substitute into the referenced instruction. Fixing this exposed a bug in `GetOrAddInst` where it would return an `InstId` of an unattached symbolic constant in some cases, rather than the `InstId` of an instruction that has the relevant (attached) constant value. That's fixed for now by turning off the `GetOrAddInst` optimization in that case, but in future we can refine this by adding the instruction to the eval block for the generic only, and not to the body of the generic.