Get rid of AddPatternInst (#7075)

Instead, use the inst category to select the right block stack. This
simplifies the API for adding insts, and in subsequent changes it will
enable certain inst kinds like `SpliceInst` to seamlessly function as
either procedural insts or pattern insts.
This commit is contained in:
Geoff Romer
2026-04-16 23:31:31 +00:00
committed by GitHub
parent af04d08965
commit e7626f46cc
10 changed files with 40 additions and 58 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ auto HandleParseNode(Context& context, Parse::TuplePatternId node_id) -> bool {
auto type_id = GetPatternType(context, GetTupleType(context, type_inst_ids));
context.node_stack().Push(
node_id,
AddPatternInst<SemIR::TuplePattern>(
AddInst<SemIR::TuplePattern>(
context, node_id, {.type_id = type_id, .elements_id = refs_id}));
return true;
}