Skip to content

Commit 7c15fba

Browse files
[Linker] Use a range-based for loop (NFC) (#98785)
1 parent 35bb9f1 commit 7c15fba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Linker/IRMover.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,8 @@ void IRLinker::prepareCompileUnitsForImport() {
11921192
// When importing for ThinLTO, prevent importing of types listed on
11931193
// the DICompileUnit that we don't need a copy of in the importing
11941194
// module. They will be emitted by the originating module.
1195-
for (unsigned I = 0, E = SrcCompileUnits->getNumOperands(); I != E; ++I) {
1196-
auto *CU = cast<DICompileUnit>(SrcCompileUnits->getOperand(I));
1195+
for (MDNode *N : SrcCompileUnits->operands()) {
1196+
auto *CU = cast<DICompileUnit>(N);
11971197
assert(CU && "Expected valid compile unit");
11981198
// Enums, macros, and retained types don't need to be listed on the
11991199
// imported DICompileUnit. This means they will only be imported

0 commit comments

Comments
 (0)