Skip to content

Commit 3662f30

Browse files
committed
[NFC] MOWTE: Deleted dead array.
The modified arguments were recorded but never used.
1 parent 0ebe825 commit 3662f30

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");
@@ -295,7 +289,6 @@ static bool isMoveOnlyWrappedTrivial(SILValue value) {
295289
bool SILMoveOnlyWrappedTypeEliminator::process() {
296290
bool madeChange = true;
297291

298-
llvm::SmallSetVector<SILArgument *, 8> touchedArgs;
299292
llvm::SmallSetVector<SILInstruction *, 8> touchedInsts;
300293

301294
auto recordValue = [&touchedInsts, fn = fn,
@@ -324,7 +317,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
324317
// None. Otherwise, preserve the ownership kind of the argument.
325318
if (arg->getType().isTrivial(*fn))
326319
arg->setOwnershipKind(OwnershipKind::None);
327-
touchedArgs.insert(arg);
328320

329321
madeChange = true;
330322
}
@@ -346,7 +338,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
346338
}
347339
}
348340

349-
SILMoveOnlyWrappedTypeEliminatorVisitor visitor(touchedArgs);
341+
SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
350342
while (!touchedInsts.empty()) {
351343
visitor.visit(touchedInsts.pop_back_val());
352344
}

0 commit comments

Comments
 (0)