Make empty ids for all block types (#4502)

Adding empty IDs to all block types. This is primarily for
TypeBlockId::Empty, which allows me to disambiguate empty tuple types,
which I think might yield a SemIR readability improvement (PR
forthcoming). I'm splitting PRs so that the limited test impact here is
clear.
This commit is contained in:
Jon Ross-Perkins
2024-11-07 22:46:22 +00:00
committed by GitHub
parent caba03d27e
commit cab7818df8
10 changed files with 40 additions and 19 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ auto MatchContext::DoWork(Context& context) -> SemIR::InstBlockId {
while (!stack_.empty()) {
EmitPatternMatch(context, stack_.pop_back_val());
}
auto block_id = context.inst_blocks().AddOrEmpty(results_);
auto block_id = context.inst_blocks().Add(results_);
results_.clear();
return block_id;
}