Skip to content

Commit 65b89ad

Browse files
committed
[NFC] MOWTE: Deleted dead array.
The modified arguments were recorded but never used.
1 parent d7354b6 commit 65b89ad

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyWrappedTypeEliminator.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ namespace {
5151

5252
struct SILMoveOnlyWrappedTypeEliminatorVisitor
5353
: SILInstructionVisitor<SILMoveOnlyWrappedTypeEliminatorVisitor, bool> {
54-
const llvm::SmallSetVector<SILArgument *, 8> &touchedArgs;
55-
56-
SILMoveOnlyWrappedTypeEliminatorVisitor(
57-
const llvm::SmallSetVector<SILArgument *, 8> &touchedArgs)
58-
: touchedArgs(touchedArgs) {}
59-
6054
bool visitSILInstruction(SILInstruction *inst) {
6155
llvm::errs() << "Unhandled SIL Instruction: " << *inst;
6256
llvm_unreachable("error");
@@ -296,7 +290,6 @@ static bool isMoveOnlyWrappedTrivial(SILValue value) {
296290
bool SILMoveOnlyWrappedTypeEliminator::process() {
297291
bool madeChange = true;
298292

299-
llvm::SmallSetVector<SILArgument *, 8> touchedArgs;
300293
llvm::SmallSetVector<SILInstruction *, 8> touchedInsts;
301294

302295
// For each value whose type is move-only wrapped:
@@ -329,7 +322,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
329322
// None. Otherwise, preserve the ownership kind of the argument.
330323
if (arg->getType().isTrivial(*fn))
331324
arg->setOwnershipKind(OwnershipKind::None);
332-
touchedArgs.insert(arg);
333325

334326
madeChange = true;
335327
}
@@ -351,7 +343,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
351343
}
352344
}
353345

354-
SILMoveOnlyWrappedTypeEliminatorVisitor visitor(touchedArgs);
346+
SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
355347
while (!touchedInsts.empty()) {
356348
visitor.visit(touchedInsts.pop_back_val());
357349
}

0 commit comments

Comments
 (0)