|
|
@@ -43,7 +43,7 @@ auto SetApiImportIR(Context& context, SemIR::ImportIR import_ir) -> void {
|
|
|
|
|
|
auto AddImportIR(Context& context, SemIR::ImportIR import_ir)
|
|
|
-> SemIR::ImportIRId {
|
|
|
- auto& ir_id = context.GetImportIRId(*import_ir.sem_ir);
|
|
|
+ auto& ir_id = context.check_ir_map()[import_ir.sem_ir->check_ir_id().index];
|
|
|
if (!ir_id.has_value()) {
|
|
|
// Note this updates check_ir_map.
|
|
|
ir_id = InternalAddImportIR(context, import_ir);
|
|
|
@@ -595,7 +595,8 @@ class ImportRefResolver : public ImportContext {
|
|
|
auto prev_inst_id = cursor_inst_id;
|
|
|
|
|
|
cursor_ir = cursor_ir->import_irs().Get(ir_inst.ir_id).sem_ir;
|
|
|
- cursor_ir_id = local_context().GetImportIRId(*cursor_ir);
|
|
|
+ cursor_ir_id =
|
|
|
+ local_context().check_ir_map()[cursor_ir->check_ir_id().index];
|
|
|
if (!cursor_ir_id.has_value()) {
|
|
|
// TODO: Should we figure out a location to assign here?
|
|
|
cursor_ir_id =
|