File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
llvm/lib/CodeGen/AsmPrinter Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2444,11 +2444,14 @@ bool AsmPrinter::doFinalization(Module &M) {
2444
2444
// we can conditionalize accesses based on whether or not it is nullptr.
2445
2445
MF = nullptr ;
2446
2446
2447
- for (GlobalVariable &G : make_early_inc_range (M.globals ())) {
2447
+ std::vector<GlobalVariable *> GlobalsToTag;
2448
+ for (GlobalVariable &G : M.globals ()) {
2448
2449
if (G.isDeclaration () || !G.isTagged ())
2449
2450
continue ;
2450
- tagGlobalDefinition (M, &G);
2451
+ GlobalsToTag. push_back ( &G);
2451
2452
}
2453
+ for (GlobalVariable *G : GlobalsToTag)
2454
+ tagGlobalDefinition (M, G);
2452
2455
2453
2456
// Gather all GOT equivalent globals in the module. We really need two
2454
2457
// passes over the globals: one to compute and another to avoid its emission
You can’t perform that action at this time.
0 commit comments