Remove inst_id from the public interface of ConstantId. (#4053)

Require mapping from a `ConstantId` to an `InstId` to go through the
`ConstantValueStore`.

This is a preparatory step for an upcoming generics change where
symbolic `ConstantId`s are no longer just a thin wrapper around an
`InstId` but instead are indexes into a table with additional
information about the symbolic constant beyond its `InstId`.
This commit is contained in:
Richard Smith
2024-06-14 00:40:53 +00:00
committed by GitHub
parent e3c15edb92
commit 9029cac727
21 changed files with 167 additions and 128 deletions
+2 -1
View File
@@ -302,7 +302,8 @@ static auto DiagnoseQualifiedDeclInUndefinedInterfaceScope(
auto builder = context.emitter().Build(
loc, QualifiedDeclInUndefinedInterfaceScope,
context.sem_ir().StringifyTypeExpr(
context.sem_ir().constant_values().Get(interface_inst_id).inst_id()));
context.sem_ir().constant_values().GetConstantInstId(
interface_inst_id)));
context.NoteUndefinedInterface(interface_id, builder);
builder.Emit();
}