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:
Jon Ross-Perkins
2024-01-27 00:36:58 +00:00
committed by GitHub
parent 13de9e9d06
commit 8167c44a03
17 changed files with 116 additions and 95 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ auto FileContext::Run() -> std::unique_ptr<llvm::Module> {
auto FileContext::GetGlobal(SemIR::InstId inst_id) -> llvm::Value* {
// All builtins are types, with the same empty lowered value.
if (inst_id.index < SemIR::BuiltinKind::ValidCount) {
if (inst_id.is_builtin()) {
return GetTypeAsValue();
}