@@ -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
// For each value whose type is move-only wrapped:
@@ -328,7 +321,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
328
321
// None. Otherwise, preserve the ownership kind of the argument.
329
322
if (arg->getType ().isTrivial (*fn))
330
323
arg->setOwnershipKind (OwnershipKind::None);
331
- touchedArgs.insert (arg);
332
324
333
325
madeChange = true ;
334
326
}
@@ -350,7 +342,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
350
342
}
351
343
}
352
344
353
- SILMoveOnlyWrappedTypeEliminatorVisitor visitor (touchedArgs) ;
345
+ SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
354
346
while (!touchedInsts.empty ()) {
355
347
visitor.visit (touchedInsts.pop_back_val ());
356
348
}
0 commit comments