Refactor LazyImportRef into ImportRefUnused. (#3656)

This makes some changes to the formatter so that ImportRefUnused and
ImportRefUsed will both be labeled as "import_ref" with an "unused ->
used" argument change in textual IR, but is otherwise not changing
logic.
This commit is contained in:
Jon Ross-Perkins
2024-01-26 03:10:00 +00:00
committed by GitHub
parent 7b933a1126
commit adad286b74
24 changed files with 96 additions and 97 deletions
+6 -6
View File
@@ -200,6 +200,12 @@ auto HandleImport(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
FatalErrorIfEncountered(inst);
}
auto HandleImportRefUnused(FunctionContext& /*context*/,
SemIR::InstId /*inst_id*/,
SemIR::ImportRefUnused inst) -> void {
FatalErrorIfEncountered(inst);
}
auto HandleInitializeFrom(FunctionContext& context, SemIR::InstId /*inst_id*/,
SemIR::InitializeFrom inst) -> void {
auto storage_type_id = context.sem_ir().insts().Get(inst.dest_id).type_id();
@@ -221,12 +227,6 @@ auto HandleIntLiteral(FunctionContext& context, SemIR::InstId inst_id,
context.SetLocal(inst_id, v);
}
auto HandleLazyImportRef(FunctionContext& /*context*/,
SemIR::InstId /*inst_id*/, SemIR::LazyImportRef inst)
-> void {
FatalErrorIfEncountered(inst);
}
auto HandleNameRef(FunctionContext& context, SemIR::InstId inst_id,
SemIR::NameRef inst) -> void {
auto type_inst_id = context.sem_ir().types().GetInstId(inst.type_id);