@@ -51,12 +51,6 @@ namespace {
5151
5252struct 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) {
295289bool SILMoveOnlyWrappedTypeEliminator::process () {
296290 bool madeChange = true ;
297291
298- llvm::SmallSetVector<SILArgument *, 8 > touchedArgs;
299292 llvm::SmallSetVector<SILInstruction *, 8 > touchedInsts;
300293
301294 // For each value whose type is move-only wrapped:
@@ -328,7 +321,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
328321 // None. Otherwise, preserve the ownership kind of the argument.
329322 if (arg->getType ().isTrivial (*fn))
330323 arg->setOwnershipKind (OwnershipKind::None);
331- touchedArgs.insert (arg);
332324
333325 madeChange = true ;
334326 }
@@ -350,7 +342,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
350342 }
351343 }
352344
353- SILMoveOnlyWrappedTypeEliminatorVisitor visitor (touchedArgs) ;
345+ SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
354346 while (!touchedInsts.empty ()) {
355347 visitor.visit (touchedInsts.pop_back_val ());
356348 }
0 commit comments