Skip to content

Commit c137e48

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e04dd68a3a26' from llvm.org/main into next
2 parents f6612fa + e04dd68 commit c137e48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/CodeGen/GlobalMerge.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,9 @@ bool GlobalMergeImpl::doMerge(SmallVectorImpl<GlobalVariable *> &Globals,
309309
for (size_t GI = 0, GE = Globals.size(); GI != GE; ++GI) {
310310
GlobalVariable *GV = Globals[GI];
311311

312-
// Reset the encountered sets for this global...
313-
std::fill(EncounteredUGS.begin(), EncounteredUGS.end(), 0);
314-
// ...and grow it in case we created new sets for the previous global.
315-
EncounteredUGS.resize(UsedGlobalSets.size());
312+
// Reset the encountered sets for this global and grow it in case we created
313+
// new sets for the previous global.
314+
EncounteredUGS.assign(UsedGlobalSets.size(), 0);
316315

317316
// We might need to create a set that only consists of the current global.
318317
// Keep track of its index into UsedGlobalSets.

0 commit comments

Comments
 (0)