Skip to content

Commit 0cbb1d5

Browse files
authored
[GlobalMerge] Use constructor to set all bits in BitVector. NFC (#124375)
The constructor has an optional bool for the starting value for each bit. Use that instead of calling set().
1 parent e734f01 commit 0cbb1d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/GlobalMerge.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ bool GlobalMergeImpl::doMerge(SmallVectorImpl<GlobalVariable *> &Globals,
271271

272272
// If we want to just blindly group all globals together, do so.
273273
if (!GlobalMergeGroupByUse || (Opt.MergeConstAggressive && isConst)) {
274-
BitVector AllGlobals(Globals.size());
275-
AllGlobals.set();
274+
BitVector AllGlobals(Globals.size(), true);
276275
return doMerge(Globals, AllGlobals, M, isConst, AddrSpace);
277276
}
278277

0 commit comments

Comments
 (0)