[llvm] 0dd8f32 - [ADT] Use structured bindings (NFC) (#161627)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 2 09:27:06 PDT 2025


Author: Kazu Hirata
Date: 2025-10-02T09:27:01-07:00
New Revision: 0dd8f322c1b40bdac469eec248e3b2b4e1043754

URL: https://github.com/llvm/llvm-project/commit/0dd8f322c1b40bdac469eec248e3b2b4e1043754
DIFF: https://github.com/llvm/llvm-project/commit/0dd8f322c1b40bdac469eec248e3b2b4e1043754.diff

LOG: [ADT] Use structured bindings (NFC) (#161627)

Both Size and Count are just integers, so I am not using & here.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/ConcurrentHashtable.h

Removed: 
    


################################################################################
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