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.
```
This commit is contained in:
Max Desiatov
2023-01-16 12:53:07 +00:00
committed by GitHub
parent 7a0bcfa09d
commit 0812484a4a

View File

@@ -3236,15 +3236,9 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
SILBuilderWithScope B(TheMemory.getUninitializedValue());
Identifier ShiftRightFn, TruncateFn, CmpEqFn;
unsigned NumMemoryElements = TheMemory.getNumElements();
unsigned SelfInitializedElt = TheMemory.getNumElements();
unsigned SuperInitElt = TheMemory.getNumElements() - 1;
// We might need an extra bit to check if self was consumed.
if (HasConditionalSelfInitialized)
++NumMemoryElements;
// Utilities.
auto destroyMemoryElement = [&](SILLocation Loc, unsigned Elt) -> SILValue {