mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Add basic support for lowering templates: we can now lower `SpliceInst` in the case where the generic and specific are from the same file (and we don't support importing templates from other files yet in general). In order for this to work, lowering needs to be able to query the expression category, and to handle instructions that appear to be (template) constants in the generic but turn out to be non-constant in the specific, so support for that is added. Switch `type_of_inst` from being added as an action inst to being added as a normal inst, since it's not an action and the old approach led to a crash in lowering.