@@ -1219,7 +1219,8 @@ void AvailableValueAggregator::addHandOffCopyDestroysForPhis(
12191219 // Otherwise, we need to insert one last destroy after the load for our phi.
12201220 auto next = std::next (load->getIterator ());
12211221 SILBuilderWithScope builder (next);
1222- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), phi);
1222+ builder.emitDestroyValueOperation (
1223+ RegularLocation::getAutoGeneratedLocation (), phi);
12231224 }
12241225
12251226 // Alright! In summary, we just lifetime extended all of our phis,
@@ -1251,7 +1252,8 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
12511252 assert (li->getParent () == load->getParent ());
12521253 auto next = std::next (load->getIterator ());
12531254 SILBuilderWithScope builder (next);
1254- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), li);
1255+ builder.emitDestroyValueOperation (
1256+ RegularLocation::getAutoGeneratedLocation (), li);
12551257 continue ;
12561258 }
12571259 }
@@ -1301,7 +1303,8 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
13011303 // Otherwise, we need to insert one last destroy after the load for our phi.
13021304 auto next = std::next (load->getIterator ());
13031305 SILBuilderWithScope builder (next);
1304- builder.emitDestroyValueOperation (RegularLocation (next->getLoc ()), cvi);
1306+ builder.emitDestroyValueOperation (
1307+ RegularLocation::getAutoGeneratedLocation (), cvi);
13051308 }
13061309}
13071310
0 commit comments