[all-commits] [llvm/llvm-project] d2de30: [ADT] Swap the two variants of DenseMap::doFind (N...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Mon Aug 25 07:33:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d2de3096b0f1fd4f0f470e34135523c65ad9c6b0
https://github.com/llvm/llvm-project/commit/d2de3096b0f1fd4f0f470e34135523c65ad9c6b0
Author: Kazu Hirata <kazu at google.com>
Date: 2025-08-25 (Mon, 25 Aug 2025)
Changed paths:
M llvm/include/llvm/ADT/DenseMap.h
Log Message:
-----------
[ADT] Swap the two variants of DenseMap::doFind (NFC) (#155203)
doFind itself makes no modification, so we can implement it as a const
function. The only problem is that the non-const version of find
needs to return a modifiable bucket.
This patch "swaps" the constness of doFind. Specifically, the primary
implementation becomes const, preventing accidental modifications.
Then the non-const variant is derived off of the const variant.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list