mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 22:02:51 +01:00
Follow the pattern used by eval_inst.h's `EvalConstantInst` to generate declarations of an overload set that handles some but not all typed inst classes. The pattern is: * A template computes the signature to use for a particular overload, producing a fallback `() -> void` signature for overloads that should not exist. * The `.def` file is used to generate a declaration per instruction kind, whose signature is generated by the template. * The `() -> void` signature that all the "should not exist" cases generate is explicitly deleted. This avoids the redundancy of manually declaring all the overloads, as we did for `PerformAction`, and is less error-prone as it both catches signature errors and definitions of overloads that are dead code and should not exist, as it did for the `FacetAccessType` overload of `LowerInst`.