@@ -1219,7 +1219,8 @@ void AvailableValueAggregator::addHandOffCopyDestroysForPhis(
1219
1219
// Otherwise, we need to insert one last destroy after the load for our phi.
1220
1220
auto next = std::next (load->getIterator ());
1221
1221
SILBuilderWithScope builder (next);
1222
- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), phi);
1222
+ builder.emitDestroyValueOperation (
1223
+ RegularLocation::getAutoGeneratedLocation (), phi);
1223
1224
}
1224
1225
1225
1226
// Alright! In summary, we just lifetime extended all of our phis,
@@ -1251,7 +1252,8 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
1251
1252
assert (li->getParent () == load->getParent ());
1252
1253
auto next = std::next (load->getIterator ());
1253
1254
SILBuilderWithScope builder (next);
1254
- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), li);
1255
+ builder.emitDestroyValueOperation (
1256
+ RegularLocation::getAutoGeneratedLocation (), li);
1255
1257
continue ;
1256
1258
}
1257
1259
}
@@ -1301,7 +1303,8 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
1301
1303
// Otherwise, we need to insert one last destroy after the load for our phi.
1302
1304
auto next = std::next (load->getIterator ());
1303
1305
SILBuilderWithScope builder (next);
1304
- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), cvi);
1306
+ builder.emitDestroyValueOperation (
1307
+ RegularLocation::getAutoGeneratedLocation (), cvi);
1305
1308
}
1306
1309
}
1307
1310
0 commit comments