Skip to content

Commit 0812484

Browse files
authored
SILOptimizer: remove unused variables and fields (#63018)
Exact warning text: ``` swift/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp:3239:12: warning: variable 'NumMemoryElements' set but not used [-Wunused-but-set-variable] unsigned NumMemoryElements = TheMemory.getNumElements(); ^ 1 warning generated. ```
1 parent 7a0bcfa commit 0812484

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3236,15 +3236,9 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
32363236
SILBuilderWithScope B(TheMemory.getUninitializedValue());
32373237
Identifier ShiftRightFn, TruncateFn, CmpEqFn;
32383238

3239-
unsigned NumMemoryElements = TheMemory.getNumElements();
3240-
32413239
unsigned SelfInitializedElt = TheMemory.getNumElements();
32423240
unsigned SuperInitElt = TheMemory.getNumElements() - 1;
32433241

3244-
// We might need an extra bit to check if self was consumed.
3245-
if (HasConditionalSelfInitialized)
3246-
++NumMemoryElements;
3247-
32483242
// Utilities.
32493243

32503244
auto destroyMemoryElement = [&](SILLocation Loc, unsigned Elt) -> SILValue {

0 commit comments

Comments
 (0)