mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 11:51:04 +01:00
Add a location to indirect imports. (#4098)
By adding an `ImportDecl` instruction, this creates something that can be referenced through `ImportIRInst`. packages/no_prelude/implicit_imports_entities.carbon is getting a test of this (import_conflict and import_conflict_reverse). Also re-packs ImportIR from 24 bytes to 16 on 64-bit, since I'm touching everywhere that makes one anyways.
This commit is contained in:
@@ -1244,6 +1244,7 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
case SemIR::BranchIf::Kind:
|
||||
case SemIR::BranchWithArg::Kind:
|
||||
case SemIR::ImplDecl::Kind:
|
||||
case SemIR::ImportDecl::Kind:
|
||||
case SemIR::Param::Kind:
|
||||
case SemIR::ReturnExpr::Kind:
|
||||
case SemIR::Return::Kind:
|
||||
@@ -1254,7 +1255,7 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
|
||||
case SemIR::ImportRefUnloaded::Kind:
|
||||
CARBON_FATAL()
|
||||
<< "ImportRefUnloaded should be loaded before TryEvalInst.";
|
||||
<< "ImportRefUnloaded should be loaded before TryEvalInst: " << inst;
|
||||
}
|
||||
return SemIR::ConstantId::NotConstant;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user