mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Merging CrossRef into ImportRefUsed, shifting builtins over. (#3659)
This is a bit of a cleanup; I probably should've just renamed CrossRef instead of adding ImportRefUsed. Adding `is_builtin` to InstId is more about providing a standard API for the check, which I expect to add a little more of. Shifts import tests to validate that the BuildValueRepr CHECK isn't accidentally hit.
This commit is contained in:
@@ -402,8 +402,8 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
// TODO: These need special handling.
|
||||
case SemIR::BindValue::Kind:
|
||||
case SemIR::Call::Kind:
|
||||
case SemIR::CrossRef::Kind:
|
||||
case SemIR::Deref::Kind:
|
||||
case SemIR::ImportRefUsed::Kind:
|
||||
case SemIR::Temporary::Kind:
|
||||
case SemIR::TemporaryStorage::Kind:
|
||||
case SemIR::ValueAsRef::Kind:
|
||||
@@ -473,8 +473,6 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
case SemIR::BranchWithArg::Kind:
|
||||
case SemIR::ClassDecl::Kind:
|
||||
case SemIR::Import::Kind:
|
||||
case SemIR::ImportRefUnused::Kind:
|
||||
case SemIR::ImportRefUsed::Kind:
|
||||
case SemIR::InterfaceDecl::Kind:
|
||||
case SemIR::Param::Kind:
|
||||
case SemIR::ReturnExpr::Kind:
|
||||
@@ -483,6 +481,10 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
case SemIR::TupleLiteral::Kind:
|
||||
case SemIR::VarStorage::Kind:
|
||||
break;
|
||||
|
||||
case SemIR::ImportRefUnused::Kind:
|
||||
CARBON_FATAL() << "ImportRefUnused should transform to ImportRefUsed "
|
||||
"before TryEvalInst.";
|
||||
}
|
||||
return SemIR::ConstantId::NotConstant;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user