Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2444,11 +2444,14 @@ bool AsmPrinter::doFinalization(Module &M) {
// we can conditionalize accesses based on whether or not it is nullptr.
MF = nullptr;

for (GlobalVariable &G : make_early_inc_range(M.globals())) {
std::vector<GlobalVariable *> GlobalsToTag;
for (GlobalVariable &G : M.globals()) {
if (G.isDeclaration() || !G.isTagged())
continue;
tagGlobalDefinition(M, &G);
GlobalsToTag.push_back(&G);
}
for (GlobalVariable *G : GlobalsToTag)
tagGlobalDefinition(M, G);

// Gather all GOT equivalent globals in the module. We really need two
// passes over the globals: one to compute and another to avoid its emission
Expand Down
Loading