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) {
24442444 // we can conditionalize accesses based on whether or not it is nullptr.
24452445 MF = nullptr ;
24462446
2447- for (GlobalVariable &G : make_early_inc_range (M.globals ())) {
2447+ std::vector<GlobalVariable *> GlobalsToTag;
2448+ for (GlobalVariable &G : M.globals ()) {
24482449 if (G.isDeclaration () || !G.isTagged ())
24492450 continue ;
2450- tagGlobalDefinition (M, &G);
2451+ GlobalsToTag. push_back ( &G);
24512452 }
2453+ for (GlobalVariable *G : GlobalsToTag)
2454+ tagGlobalDefinition (M, G);
24522455
24532456 // Gather all GOT equivalent globals in the module. We really need two
24542457 // 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