summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2024-05-07 20:56:55 -0700
committerGitHub <noreply@github.com>2024-05-07 20:56:55 -0700
commit2c209957819328481554e7c5929d134502b4972a (patch)
tree7f3affe74273e162ec984aa362312f2a5605fc8a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent812c3025ec033ad1f306aff7f8b6e6695a79ee35 (diff)
[RISCV] Detect duplicate extensions in parseNormalizedArchString. (#91416)
This detects the same extension name being added twice. Mostly I'm worried about the case that the same string appears with two different versions. We will only preserve one of the versions. We could allow the same version to be repeated, but that doesn't seem useful at the moment. I've updated addExtension to use map::emplace instead of map::operator[]. This means we only keep the first version if there are duplicates. Previously we kept the last version, but that shouldn't matter now that we don't allow duplicates. parseArchString already doesn't allow duplicates.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions