[llvm] 089ba11 - [Linker] Use a range-based for loop (NFC) (#97656)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 16:53:45 PDT 2024


Author: Kazu Hirata
Date: 2024-07-03T16:53:41-07:00
New Revision: 089ba1127f35fe89ff4d18cca1c87869f9eace6c

URL: https://github.com/llvm/llvm-project/commit/089ba1127f35fe89ff4d18cca1c87869f9eace6c
DIFF: https://github.com/llvm/llvm-project/commit/089ba1127f35fe89ff4d18cca1c87869f9eace6c.diff

LOG: [Linker] Use a range-based for loop (NFC) (#97656)

Added: 
    

Modified: 
    llvm/lib/Linker/IRMover.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Linker/IRMover.cpp b/llvm/lib/Linker/IRMover.cpp
index 7a5aa0c8047821..ba8f371127764b 100644
--- a/llvm/lib/Linker/IRMover.cpp
+++ b/llvm/lib/Linker/IRMover.cpp
@@ -1489,8 +1489,7 @@ Error IRLinker::linkModuleFlagsMetadata() {
   }
 
   // Check all of the requirements.
-  for (unsigned I = 0, E = Requirements.size(); I != E; ++I) {
-    MDNode *Requirement = Requirements[I];
+  for (MDNode *Requirement : Requirements) {
     MDString *Flag = cast<MDString>(Requirement->getOperand(0));
     Metadata *ReqValue = Requirement->getOperand(1);
 


        


More information about the llvm-commits mailing list