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