Skip to content

Commit c3d39cb

Browse files
authored
[ADT][NFC] Constexpr-ify if in DenseMap::clear (#108243)
Make if constexpr due to constexpr condition.
1 parent bd4e0df commit c3d39cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/DenseMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class DenseMapBase : public DebugEpochBase {
120120
}
121121

122122
const KeyT EmptyKey = getEmptyKey();
123-
if (std::is_trivially_destructible<ValueT>::value) {
123+
if constexpr (std::is_trivially_destructible_v<ValueT>) {
124124
// Use a simpler loop when values don't need destruction.
125125
for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P)
126126
P->getFirst() = EmptyKey;

0 commit comments

Comments
 (0)