mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user