Skip to content

Commit ef7a6b8

Browse files
authored
PredictableMemOpt: fix a wrong debug info location type (#64394)
Fixes a crash in the debug info verification rdar://106594725
1 parent 385371c commit ef7a6b8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/Mandatory/PredictableMemOpt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ 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(next->getLoc(), phi);
1222+
builder.emitDestroyValueOperation(RegularLocation(next->getLoc()), phi);
12231223
}
12241224

12251225
// Alright! In summary, we just lifetime extended all of our phis,
@@ -1251,7 +1251,7 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
12511251
assert(li->getParent() == load->getParent());
12521252
auto next = std::next(load->getIterator());
12531253
SILBuilderWithScope builder(next);
1254-
builder.emitDestroyValueOperation(next->getLoc(), li);
1254+
builder.emitDestroyValueOperation(RegularLocation(next->getLoc()), li);
12551255
continue;
12561256
}
12571257
}
@@ -1301,7 +1301,7 @@ void AvailableValueAggregator::addMissingDestroysForCopiedValues(
13011301
// Otherwise, we need to insert one last destroy after the load for our phi.
13021302
auto next = std::next(load->getIterator());
13031303
SILBuilderWithScope builder(next);
1304-
builder.emitDestroyValueOperation(next->getLoc(), cvi);
1304+
builder.emitDestroyValueOperation(RegularLocation(next->getLoc()), cvi);
13051305
}
13061306
}
13071307

0 commit comments

Comments
 (0)