Pass imports to SemIR. (#3415)

This adds instructions so that we get printing. I may adjust the
instruction format a little further to add a type, but I think the basic
setup will remain.

Note this builds on #3414
This commit is contained in:
Jon Ross-Perkins
2023-11-28 19:55:38 +00:00
committed by GitHub
parent 35d15a390c
commit 239f8030a4
20 changed files with 228 additions and 38 deletions
+8
View File
@@ -186,6 +186,14 @@ auto HandleFunctionDecl(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
<< inst;
}
auto HandleImport(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
SemIR::Import inst) -> void {
CARBON_FATAL()
<< "Should not be encountered. If that changes, we may want to change "
"higher-level logic to skip them rather than calling this. "
<< 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();