We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e532241 commit d970350Copy full SHA for d970350
1 file changed
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2444,11 +2444,14 @@ bool AsmPrinter::doFinalization(Module &M) {
2444
// we can conditionalize accesses based on whether or not it is nullptr.
2445
MF = nullptr;
2446
2447
- for (GlobalVariable &G : make_early_inc_range(M.globals())) {
+ std::vector<GlobalVariable *> GlobalsToTag;
2448
+ for (GlobalVariable &G : M.globals()) {
2449
if (G.isDeclaration() || !G.isTagged())
2450
continue;
- tagGlobalDefinition(M, &G);
2451
+ GlobalsToTag.push_back(&G);
2452
}
2453
+ for (GlobalVariable *G : GlobalsToTag)
2454
+ tagGlobalDefinition(M, G);
2455
2456
// Gather all GOT equivalent globals in the module. We really need two
2457
// passes over the globals: one to compute and another to avoid its emission
0 commit comments