about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-01-30 09:12:35 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-01-30 09:39:52 +1100
commit022c0ce94787a76587fd39519f1358acd98fed49 (patch)
treef9edf621e032d1da8f2de03e5e311955c50e2077 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent01a26c026ddd9f0da0307468b07b003b8759fc4a (diff)
downloadrust-022c0ce94787a76587fd39519f1358acd98fed49.tar.gz
rust-022c0ce94787a76587fd39519f1358acd98fed49.zip
Remove `NamedVarMap`.
`NamedVarMap` is extremely similar to `ResolveBoundVars`. The former
contains two `UnordMap<ItemLocalId, T>` fields (obscured behind
`ItemLocalMap` typedefs). The latter contains two
`SortedMap<ItemLocalId, T>` fields. We construct a `NamedVarMap` and
then convert it into a `ResolveBoundVars` by sorting the `UnordMap`s,
which is unnecessary busywork.

This commit removes `NamedVarMap` and constructs a `ResolveBoundVars`
directly. `SortedMap` and `NamedVarMap` have slightly different
perf characteristics during construction (e.g. speed of insertion) but
this code isn't hot enough for that to matter.

A few details to note.
- A `FIXME` comment is removed.
- The detailed comments on the fields of `NamedVarMap` are copied to
  `ResolveBoundVars` (which has a single, incorrect comment).
- `BoundVarContext::map` is renamed.
- `ResolveBoundVars` gets a derived `Default` impl.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions