From 363e4401358bfbf50ac5a951910a24220e8a99ec Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 20 Apr 2025 15:11:18 -0700 Subject: [PATCH] [BOLT] Call hash_combine_range with ranges (NFC) --- bolt/lib/Profile/YAMLProfileWriter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 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)); } };