Interns `name` into a `UserExternalNameRef` and ensures that duplicate instances of `name` are given a unique name ref index.
(&mut self, name: UserExternalName)
| 381 | /// Interns `name` into a `UserExternalNameRef` and ensures that duplicate |
| 382 | /// instances of `name` are given a unique name ref index. |
| 383 | fn intern_name(&mut self, name: UserExternalName) -> UserExternalNameRef { |
| 384 | *self |
| 385 | .name_intern |
| 386 | .entry(name.clone()) |
| 387 | .or_insert_with(|| self.name_map.push(name)) |
| 388 | } |
| 389 | |
| 390 | /// Extracts the name map that was created while translating this function. |
| 391 | pub fn take_name_map(&mut self) -> PrimaryMap<UserExternalNameRef, UserExternalName> { |
no test coverage detected