[llvm] [ADT] Use structured bindings (NFC) (PR #161627)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 22:06:20 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/161627
Both Size and Count are just integers, so I am not using & here.
>From fff824df9d0531f190d441450fa0d749f373e5d4 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 1 Oct 2025 07:58:51 -0700
Subject: [PATCH] [ADT] Use structured bindings (NFC)
Both Size and Count are just integers, so I am not using & here.
---
llvm/include/llvm/ADT/ConcurrentHashtable.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/include/llvm/ADT/ConcurrentHashtable.h b/llvm/include/llvm/ADT/ConcurrentHashtable.h
index 6de194db9ba7a..6a943c5b062e7 100644
--- a/llvm/include/llvm/ADT/ConcurrentHashtable.h
+++ b/llvm/include/llvm/ADT/ConcurrentHashtable.h
@@ -253,9 +253,8 @@ class ConcurrentHashTableByPtr {
OS << "\nOverall number of entries = " << OverallNumberOfEntries;
OS << "\nOverall number of non empty buckets = " << NumberOfNonEmptyBuckets;
- for (auto &BucketSize : BucketSizesMap)
- OS << "\n Number of buckets with size " << BucketSize.first << ": "
- << BucketSize.second;
+ for (auto [Size, Count] : BucketSizesMap)
+ OS << "\n Number of buckets with size " << Size << ": " << Count;
std::stringstream stream;
stream << std::fixed << std::setprecision(2)
More information about the llvm-commits
mailing list