[llvm] [Analysis] Use a range-based for loop (NFC) (PR #139488)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun May 11 19:39:50 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139488
None
>From beb7b64b0ae01d8933eae039c24bed3923086a1d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 11 May 2025 19:30:17 -0700
Subject: [PATCH] [Analysis] Use a range-based for loop (NFC)
---
llvm/lib/Analysis/DXILResource.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/lib/Analysis/DXILResource.cpp b/llvm/lib/Analysis/DXILResource.cpp
index 1602b24e7d9af..baba7d2c75e58 100644
--- a/llvm/lib/Analysis/DXILResource.cpp
+++ b/llvm/lib/Analysis/DXILResource.cpp
@@ -955,9 +955,7 @@ void DXILResourceBindingInfo::populate(Module &M, DXILResourceTypeMap &DRTM) {
// for each binding type and used spaces. Bindings are sorted by resource
// class, space, and lower bound register slot.
BindingSpaces *BS = &SRVSpaces;
- for (unsigned I = 0, E = Bindings.size(); I != E; ++I) {
- Binding &B = Bindings[I];
-
+ for (const Binding &B : Bindings) {
if (BS->RC != B.RC)
// move to the next resource class spaces
BS = &getBindingSpaces(B.RC);
More information about the llvm-commits
mailing list