Remove InstId::Builtin members (#4632)

- `InstId::Builtin<Inst>` -> `<Inst>::SingletonInstId`
- `InstId::PackageNamespace` -> `Namespace::PackageInstId`
This commit is contained in:
Jon Ross-Perkins
2024-12-05 18:13:46 +00:00
committed by GitHub
parent d79d9e0884
commit efab39cbd9
38 changed files with 131 additions and 150 deletions
+2 -2
View File
@@ -233,13 +233,13 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorAmpId node_id)
CARBON_DIAGNOSTIC(AddrOfEphemeralRef, Error,
"cannot take the address of a temporary object");
context.emitter().Emit(TokenOnly(node_id), AddrOfEphemeralRef);
value_id = SemIR::InstId::BuiltinErrorInst;
value_id = SemIR::ErrorInst::SingletonInstId;
break;
default:
CARBON_DIAGNOSTIC(AddrOfNonRef, Error,
"cannot take the address of non-reference expression");
context.emitter().Emit(TokenOnly(node_id), AddrOfNonRef);
value_id = SemIR::InstId::BuiltinErrorInst;
value_id = SemIR::ErrorInst::SingletonInstId;
break;
}
context.AddInstAndPush<SemIR::AddrOf>(