@@ -51,12 +51,6 @@ namespace {
51
51
52
52
struct SILMoveOnlyWrappedTypeEliminatorVisitor
53
53
: SILInstructionVisitor<SILMoveOnlyWrappedTypeEliminatorVisitor, bool > {
54
- const llvm::SmallSetVector<SILArgument *, 8 > &touchedArgs;
55
-
56
- SILMoveOnlyWrappedTypeEliminatorVisitor (
57
- const llvm::SmallSetVector<SILArgument *, 8 > &touchedArgs)
58
- : touchedArgs(touchedArgs) {}
59
-
60
54
bool visitSILInstruction (SILInstruction *inst) {
61
55
llvm::errs () << " Unhandled SIL Instruction: " << *inst;
62
56
llvm_unreachable (" error" );
@@ -295,7 +289,6 @@ static bool isMoveOnlyWrappedTrivial(SILValue value) {
295
289
bool SILMoveOnlyWrappedTypeEliminator::process () {
296
290
bool madeChange = true ;
297
291
298
- llvm::SmallSetVector<SILArgument *, 8 > touchedArgs;
299
292
llvm::SmallSetVector<SILInstruction *, 8 > touchedInsts;
300
293
301
294
auto recordValue = [&touchedInsts, fn = fn,
@@ -324,7 +317,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
324
317
// None. Otherwise, preserve the ownership kind of the argument.
325
318
if (arg->getType ().isTrivial (*fn))
326
319
arg->setOwnershipKind (OwnershipKind::None);
327
- touchedArgs.insert (arg);
328
320
329
321
madeChange = true ;
330
322
}
@@ -346,7 +338,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
346
338
}
347
339
}
348
340
349
- SILMoveOnlyWrappedTypeEliminatorVisitor visitor (touchedArgs) ;
341
+ SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
350
342
while (!touchedInsts.empty ()) {
351
343
visitor.visit (touchedInsts.pop_back_val ());
352
344
}
0 commit comments