[llvm] [ADT] Use structured bindings (NFC) (PR #161627)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 22:06:55 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
Both Size and Count are just integers, so I am not using & here.
---
Full diff: https://github.com/llvm/llvm-project/pull/161627.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/ConcurrentHashtable.h (+2-3)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/161627
More information about the llvm-commits
mailing list