We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0916d4d commit 1bf6c19Copy full SHA for 1bf6c19
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2444,15 +2444,10 @@ bool AsmPrinter::doFinalization(Module &M) {
2444
// we can conditionalize accesses based on whether or not it is nullptr.
2445
MF = nullptr;
2446
2447
- SmallVector<GlobalVariable *> GlobalsToTag;
2448
- for (GlobalVariable &G : M.globals()) {
+ for (GlobalVariable &G : make_early_inc_range(M.globals())) {
2449
if (G.isDeclaration() || !G.isTagged())
2450
continue;
2451
- GlobalsToTag.push_back(&G);
2452
- }
2453
-
2454
- for (GlobalVariable *G : GlobalsToTag) {
2455
- tagGlobalDefinition(M, G);
+ tagGlobalDefinition(M, &G);
2456
}
2457
2458
// Gather all GOT equivalent globals in the module. We really need two
0 commit comments