File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -177,24 +177,24 @@ class UpdatingInstructionIteratorRegistry {
177
177
178
178
179
179
public:
180
- UpdatingInstructionIteratorRegistry () :
181
- callbacks (InstModCallbacks()
180
+ UpdatingInstructionIteratorRegistry () {
181
+ callbacks = std::move (InstModCallbacks ()
182
182
.onDelete ([this ](SILInstruction *toDelete) {
183
183
notifyDelete (toDelete);
184
184
toDelete->eraseFromParent ();
185
185
})
186
186
.onCreateNewInst (
187
187
[this ](SILInstruction *newlyCreatedInst) {
188
188
notifyNew (newlyCreatedInst);
189
- }))
190
- { }
189
+ }));
190
+ }
191
191
192
192
UpdatingInstructionIteratorRegistry (InstModCallbacks &&chainedCallbacks) :
193
193
// Copy the two std::functions that we need. The rest of the callbacks are
194
194
// copied implicitly by assignment.
195
195
chainedDelete (std::move(chainedCallbacks.deleteInstFunc)),
196
- chainedNew (std::move(chainedCallbacks.createdNewInstFunc)),
197
- callbacks ( std::move(chainedCallbacks
196
+ chainedNew (std::move(chainedCallbacks.createdNewInstFunc)) {
197
+ callbacks = std::move (chainedCallbacks
198
198
.onDelete ([this ](SILInstruction *toDelete) {
199
199
notifyDelete (toDelete);
200
200
if (chainedDelete) {
@@ -209,8 +209,8 @@ class UpdatingInstructionIteratorRegistry {
209
209
if (chainedNew) {
210
210
chainedNew (newlyCreatedInst);
211
211
}
212
- })))
213
- { }
212
+ }));
213
+ }
214
214
215
215
// The callbacks capture 'this'. So copying is invalid.
216
216
UpdatingInstructionIteratorRegistry (
You can’t perform that action at this time.
0 commit comments