File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ class GenericCloner
42
42
43
43
llvm::SmallVector<AllocStackInst *, 8 > AllocStacks;
44
44
llvm::SmallVector<StoreBorrowInst *, 8 > StoreBorrowsToCleanup;
45
- llvm::SmallVector<TermInst *, 8 > FunctionExits;
46
45
AllocStackInst *ReturnValueAddr = nullptr ;
47
46
48
47
public:
@@ -94,11 +93,6 @@ class GenericCloner
94
93
if (Callback)
95
94
Callback (Orig, Cloned);
96
95
97
- if (auto *termInst = dyn_cast<TermInst>(Cloned)) {
98
- if (termInst->isFunctionExiting ()) {
99
- FunctionExits.push_back (termInst);
100
- }
101
- }
102
96
SILClonerWithScopes<GenericCloner>::postProcess (Orig, Cloned);
103
97
}
104
98
Original file line number Diff line number Diff line change @@ -192,8 +192,7 @@ void GenericCloner::visitTerminator(SILBasicBlock *BB) {
192
192
getBuilder ().createDeallocStack (ASI->getLoc (), ASI);
193
193
}
194
194
if (ReturnValue) {
195
- auto *NewReturn = getBuilder ().createReturn (RI->getLoc (), ReturnValue);
196
- FunctionExits.push_back (NewReturn);
195
+ getBuilder ().createReturn (RI->getLoc (), ReturnValue);
197
196
return ;
198
197
}
199
198
} else if (OrigTermInst->isFunctionExiting ()) {
You can’t perform that action at this time.
0 commit comments