aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-09-02 09:21:17 -0700
committerGitHub <noreply@github.com>2025-09-02 09:21:17 -0700
commit2a49ebf0ebce2e8157c5ac35ec27c6195b61c68a (patch)
treebe6101677cbc0cbd491751a6aaa5a4246ae0374c /clang/lib/Frontend/CompilerInvocation.cpp
parent5e91314b9bfb79855314d53713a893be400f7d10 (diff)
downloadllvm-2a49ebf0ebce2e8157c5ac35ec27c6195b61c68a.zip
llvm-2a49ebf0ebce2e8157c5ac35ec27c6195b61c68a.tar.gz
llvm-2a49ebf0ebce2e8157c5ac35ec27c6195b61c68a.tar.bz2
[ADT] Simplify StringMapIterBase (NFC) (#156392)
In open-adressing hash tables, begin() needs to advance to the first valid element. We don't need to do the same for any other operations like end(), find(), and try_emplace(). The problem is that the constructor of StringMapIterBase says: bool NoAdvance = false This increases the burden on the callers because most places need to pass true for NoAdvance, defeating the benefit of the default parameter. This patch fixes the problem by changing the name and default to: bool Advance = false and adjusting callers. Again, begin() is the only caller that specifies this parameter. This patch fixes a "latent bug" where try_emplace() was requesting advancing even on a successful insertion. I say "latent" because the request is a no-op on success.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions