mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 06:51:05 +01:00
Remove InstId::Builtin members (#4632)
- `InstId::Builtin<Inst>` -> `<Inst>::SingletonInstId` - `InstId::PackageNamespace` -> `Namespace::PackageInstId`
This commit is contained in:
@@ -124,8 +124,8 @@ auto MatchContext::DoWork(Context& context) -> SemIR::InstBlockId {
|
||||
|
||||
auto MatchContext::EmitPatternMatch(Context& context,
|
||||
MatchContext::WorkItem entry) -> void {
|
||||
if (entry.pattern_id == SemIR::InstId::BuiltinErrorInst) {
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
if (entry.pattern_id == SemIR::ErrorInst::SingletonInstId) {
|
||||
results_.push_back(SemIR::ErrorInst::SingletonInstId);
|
||||
return;
|
||||
}
|
||||
DiagnosticAnnotationScope annotate_diagnostics(
|
||||
@@ -182,7 +182,7 @@ auto MatchContext::EmitPatternMatch(Context& context,
|
||||
context.emitter().Emit(
|
||||
TokenOnly(context.insts().GetLocId(entry.scrutinee_id)),
|
||||
AddrSelfIsNonRef);
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
results_.push_back(SemIR::ErrorInst::SingletonInstId);
|
||||
return;
|
||||
}
|
||||
auto scrutinee_ref = context.insts().Get(scrutinee_ref_id);
|
||||
@@ -203,8 +203,8 @@ auto MatchContext::EmitPatternMatch(Context& context,
|
||||
switch (kind_) {
|
||||
case MatchKind::Caller: {
|
||||
CARBON_CHECK(entry.scrutinee_id.is_valid());
|
||||
if (entry.scrutinee_id == SemIR::InstId::BuiltinErrorInst) {
|
||||
results_.push_back(SemIR::InstId::BuiltinErrorInst);
|
||||
if (entry.scrutinee_id == SemIR::ErrorInst::SingletonInstId) {
|
||||
results_.push_back(SemIR::ErrorInst::SingletonInstId);
|
||||
} else {
|
||||
results_.push_back(ConvertToValueOfType(
|
||||
context, context.insts().GetLocId(entry.scrutinee_id),
|
||||
|
||||
Reference in New Issue
Block a user