[llvm] [Support] Use range-based for loops (NFC) (PR #169001)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 21 08:20:03 PST 2025


================
@@ -602,10 +602,8 @@ static Option *LookupNearestOption(StringRef Arg,
   // Find the closest match.
   Option *Best = nullptr;
   unsigned BestDistance = 0;
-  for (StringMap<Option *>::const_iterator it = OptionsMap.begin(),
-                                           ie = OptionsMap.end();
-       it != ie; ++it) {
-    Option *O = it->second;
+  for (const auto &Opt : OptionsMap) {
+    Option *O = Opt.second;
----------------
kazutakahirata wrote:

Fixed.  Thanks!

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


More information about the llvm-commits mailing list