Skip to content

Commit cb75f30

Browse files
kazutakahirataPriyanshu3820
authored andcommitted
[LTO] Use a range-based for loop (NFC) (llvm#169000)
Identified with modernize-loop-convert.
1 parent 555cdc9 commit cb75f30

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/LTO/LTOModule.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,11 @@ void LTOModule::parseSymbols() {
620620
}
621621

622622
// make symbols for all undefines
623-
for (StringMap<NameAndAttributes>::iterator u =_undefines.begin(),
624-
e = _undefines.end(); u != e; ++u) {
623+
for (const auto &[Key, Value] : _undefines) {
625624
// If this symbol also has a definition, then don't make an undefine because
626625
// it is a tentative definition.
627-
if (_defines.count(u->getKey())) continue;
628-
NameAndAttributes info = u->getValue();
629-
_symbols.push_back(info);
626+
if (!_defines.contains(Key))
627+
_symbols.push_back(Value);
630628
}
631629
}
632630

0 commit comments

Comments
 (0)