Skip to content

Commit 1bf6c19

Browse files
committed
make_early_inc_range
Created using spr 1.3.4
1 parent 0916d4d commit 1bf6c19

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,15 +2444,10 @@ bool AsmPrinter::doFinalization(Module &M) {
24442444
// we can conditionalize accesses based on whether or not it is nullptr.
24452445
MF = nullptr;
24462446

2447-
SmallVector<GlobalVariable *> GlobalsToTag;
2448-
for (GlobalVariable &G : M.globals()) {
2447+
for (GlobalVariable &G : make_early_inc_range(M.globals())) {
24492448
if (G.isDeclaration() || !G.isTagged())
24502449
continue;
2451-
GlobalsToTag.push_back(&G);
2452-
}
2453-
2454-
for (GlobalVariable *G : GlobalsToTag) {
2455-
tagGlobalDefinition(M, G);
2450+
tagGlobalDefinition(M, &G);
24562451
}
24572452

24582453
// Gather all GOT equivalent globals in the module. We really need two

0 commit comments

Comments
 (0)