aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugProgramInstruction.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-10-25 10:05:02 -0700
committerGitHub <noreply@github.com>2025-10-25 10:05:02 -0700
commitc3a4093dae316c0c4cf71bf965c3f6a99a8476d8 (patch)
treefcd3338c852df7e892579faafd729968263fae3f /llvm/lib/IR/DebugProgramInstruction.cpp
parente510797700fb53d114371ad18084bce11fdfafc0 (diff)
downloadllvm-c3a4093dae316c0c4cf71bf965c3f6a99a8476d8.zip
llvm-c3a4093dae316c0c4cf71bf965c3f6a99a8476d8.tar.gz
llvm-c3a4093dae316c0c4cf71bf965c3f6a99a8476d8.tar.bz2
[ADT] Consolidate copyFrom in DenseMap.h (NFC) (#165101)
DenseMap.h has: - DenseMapBase::copyFrom - DenseMap::copyFrom - SmallDenseMap::copyFrom The latter two clear and set up the storage again before delegating DenseMapBase::copyFrom to do the actual work of copying buckets. This patch consolidates all these into DenseMapBase::copyFrom while eliminating name shadowing concerns. Note that DenseMap::copyFrom and SmallDenseMap::copyFrom are nearly identical, and they can be made identical with small adjustments: - Set NumEntries and NumTombstones to 0 unconditionally. - Teach SmallDenseMap::allocateBuckets to always return true. This patch essentially applies these adjustments and then "inlines" the identical function body to the beginning of DenseMapBase::copyFrom. This patch de-templatizes DenseMapBase::copyFrom because nobody calls it with any type other than DerivedT.
Diffstat (limited to 'llvm/lib/IR/DebugProgramInstruction.cpp')
0 files changed, 0 insertions, 0 deletions