[llvm] [LTO] Use a range-based for loop (NFC) (PR #105467)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 20 21:39:07 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/105467
None
>From d4a276d3ec4011283ca4be5bfbcf2015edc7afd8 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 20 Aug 2024 21:28:42 -0700
Subject: [PATCH] [LTO] Use a range-based for loop (NFC)
---
llvm/lib/LTO/LTO.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index f69e089edf42e7..7a461b46bdff46 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -330,8 +330,8 @@ std::string llvm::computeLTOCacheKey(
// Include the hash for all type identifiers used by this module.
for (GlobalValue::GUID TId : UsedTypeIds) {
auto TidIter = Index.typeIds().equal_range(TId);
- for (auto It = TidIter.first; It != TidIter.second; ++It)
- AddTypeIdSummary(It->second.first, It->second.second);
+ for (const auto &I : make_range(TidIter))
+ AddTypeIdSummary(I.second.first, I.second.second);
}
AddUnsigned(UsedCfiDefs.size());
More information about the llvm-commits
mailing list