[llvm] [BOLT] Call hash_combine_range with ranges (NFC) (PR #136524)

via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 20 18:43:27 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/136524.diff


1 Files Affected:

- (modified) bolt/lib/Profile/YAMLProfileWriter.cpp (+3-6) 


``````````diff
diff --git a/bolt/lib/Profile/YAMLProfileWriter.cpp b/bolt/lib/Profile/YAMLProfileWriter.cpp
index e394858163560..2bdc7b65b4804 100644
--- a/bolt/lib/Profile/YAMLProfileWriter.cpp
+++ b/bolt/lib/Profile/YAMLProfileWriter.cpp
@@ -133,12 +133,9 @@ std::vector<yaml::bolt::PseudoProbeInfo>
 YAMLProfileWriter::convertNodeProbes(NodeIdToProbes &NodeProbes) {
   struct BlockProbeInfoHasher {
     size_t operator()(const yaml::bolt::PseudoProbeInfo &BPI) const {
-      auto HashCombine = [](auto &Range) {
-        return llvm::hash_combine_range(Range.begin(), Range.end());
-      };
-      return llvm::hash_combine(HashCombine(BPI.BlockProbes),
-                                HashCombine(BPI.CallProbes),
-                                HashCombine(BPI.IndCallProbes));
+      return llvm::hash_combine(llvm::hash_combine_range(BPI.BlockProbes),
+                                llvm::hash_combine_range(BPI.CallProbes),
+                                llvm::hash_combine_range(BPI.IndCallProbes));
     }
   };
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/136524


More information about the llvm-commits mailing list