[llvm] [LTO] Use a range-based for loop (NFC) (PR #169000)
Tim Gymnich via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 01:48:22 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))
----------------
tgymnich wrote:
```suggestion
if (!_defines.contains(Key))
```
https://github.com/llvm/llvm-project/pull/169000
More information about the llvm-commits
mailing list