File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -127,9 +127,8 @@ bool llvm::optimizeGlobalCtorsList(
127
127
bool MadeChange = false ;
128
128
129
129
// Loop over global ctors, optimizing them when we can.
130
- unsigned NumCtors = Ctors.size ();
131
- BitVector CtorsToRemove (NumCtors);
132
- for (unsigned i = 0 ; i != Ctors.size () && NumCtors > 0 ; ++i) {
130
+ BitVector CtorsToRemove (Ctors.size ());
131
+ for (unsigned i = 0 , e = Ctors.size (); i != e; ++i) {
133
132
Function *F = Ctors[i];
134
133
// Found a null terminator in the middle of the list, prune off the rest of
135
134
// the list.
@@ -146,7 +145,6 @@ bool llvm::optimizeGlobalCtorsList(
146
145
if (ShouldRemove (F)) {
147
146
Ctors[i] = nullptr ;
148
147
CtorsToRemove.set (i);
149
- NumCtors--;
150
148
MadeChange = true ;
151
149
continue ;
152
150
}
You can’t perform that action at this time.
0 commit comments