mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -163,7 +163,7 @@ static auto TryMergeRedecl(Context& context, Parse::AnyFunctionDeclId node_id,
|
||||
|
||||
// Use the type to get the ID.
|
||||
if (auto struct_value = context.insts().TryGetAs<SemIR::StructValue>(
|
||||
context.constant_values().Get(prev_id).inst_id())) {
|
||||
context.constant_values().GetConstantInstId(prev_id))) {
|
||||
if (auto function_type = context.types().TryGetAs<SemIR::FunctionType>(
|
||||
struct_value->type_id)) {
|
||||
prev_function_id = function_type->function_id;
|
||||
|
||||
Reference in New Issue
Block a user