@@ -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" );
@@ -296,7 +290,6 @@ static bool isMoveOnlyWrappedTrivial(SILValue value) {
296290bool 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