File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -129,30 +129,39 @@ auto InstNamer::GetScopeIdOffset(ScopeIdTypeEnum id_enum) const -> int {
129
129
switch (id_enum) {
130
130
case ScopeIdTypeEnum::None:
131
131
// `None` will be getting a full count of scopes.
132
+
132
133
offset += sem_ir_->associated_constants ().size ();
133
134
[[fallthrough]];
134
135
case ScopeIdTypeEnum::For<AssociatedConstantId>:
136
+
135
137
offset += sem_ir_->classes ().size ();
136
138
[[fallthrough]];
137
139
case ScopeIdTypeEnum::For<ClassId>:
140
+
138
141
offset += sem_ir_->cpp_overload_sets ().size ();
139
142
[[fallthrough]];
140
143
case ScopeIdTypeEnum::For<CppOverloadSetId>:
144
+
141
145
offset += sem_ir_->functions ().size ();
142
146
[[fallthrough]];
143
147
case ScopeIdTypeEnum::For<FunctionId>:
148
+
144
149
offset += sem_ir_->impls ().size ();
145
150
[[fallthrough]];
146
151
case ScopeIdTypeEnum::For<ImplId>:
152
+
147
153
offset += sem_ir_->interfaces ().size ();
148
154
[[fallthrough]];
149
155
case ScopeIdTypeEnum::For<InterfaceId>:
156
+
150
157
offset += sem_ir_->specific_interfaces ().size ();
151
158
[[fallthrough]];
152
159
case ScopeIdTypeEnum::For<SpecificInterfaceId>:
160
+
153
161
offset += sem_ir_->vtables ().size ();
154
162
[[fallthrough]];
155
163
case ScopeIdTypeEnum::For<VtableId>:
164
+
156
165
// All type-specific scopes are offset by `FirstEntityScope`.
157
166
offset += static_cast <int >(ScopeId::FirstEntityScope);
158
167
return offset;
You can’t perform that action at this time.
0 commit comments