[llvm] [LTO] Use a range-based for loop (NFC) (PR #169000)

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


================
@@ -620,13 +620,11 @@ void LTOModule::parseSymbols() {
   }
 
   // make symbols for all undefines
-  for (StringMap<NameAndAttributes>::iterator u =_undefines.begin(),
-         e = _undefines.end(); u != e; ++u) {
+  for (const auto &[Key, Value] : _undefines) {
     // If this symbol also has a definition, then don't make an undefine because
     // it is a tentative definition.
-    if (_defines.count(u->getKey())) continue;
-    NameAndAttributes info = u->getValue();
-    _symbols.push_back(info);
+    if (!_defines.count(Key))
----------------
kazutakahirata wrote:

Fixed.  Thanks!

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


More information about the llvm-commits mailing list