@@ -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" );
@@ -296,7 +290,6 @@ static bool isMoveOnlyWrappedTrivial(SILValue value) {
296
290
bool SILMoveOnlyWrappedTypeEliminator::process () {
297
291
bool madeChange = true ;
298
292
299
- llvm::SmallSetVector<SILArgument *, 8 > touchedArgs;
300
293
llvm::SmallSetVector<SILInstruction *, 8 > touchedInsts;
301
294
302
295
// For each value whose type is move-only wrapped:
@@ -329,7 +322,6 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
329
322
// None. Otherwise, preserve the ownership kind of the argument.
330
323
if (arg->getType ().isTrivial (*fn))
331
324
arg->setOwnershipKind (OwnershipKind::None);
332
- touchedArgs.insert (arg);
333
325
334
326
madeChange = true ;
335
327
}
@@ -351,7 +343,7 @@ bool SILMoveOnlyWrappedTypeEliminator::process() {
351
343
}
352
344
}
353
345
354
- SILMoveOnlyWrappedTypeEliminatorVisitor visitor (touchedArgs) ;
346
+ SILMoveOnlyWrappedTypeEliminatorVisitor visitor;
355
347
while (!touchedInsts.empty ()) {
356
348
visitor.visit (touchedInsts.pop_back_val ());
357
349
}
0 commit comments