mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:01:14 +01:00
InstValueKind is really just wrapping HasTypeIdMember. Rather than exposing this as an enum, expose it as a bool since it better reflects what's going on. In eval.cpp, AddImportedConstant should never be called on an untyped instruction. In FormatInstLhs, we can also depend on whether InstNamer has assigned a name in order to decide whether to print an instruction. This should avoid some divergence with CollectNamesInBlock. We also discussed restoring InstValueKind::Untyped, but that's mainly motivated by the formatter, and the InstNamer approach gives a more localized implementation.