[Projection] Look through move_value insts.

This commit is contained in:
Nate Chandler
2022-08-30 16:44:47 -07:00
parent 794e33669e
commit 9b185574d3

View File

@@ -387,7 +387,7 @@ Optional<ProjectionPath> ProjectionPath::getProjectionPath(SILValue Start,
// TODO: migrate users to getProjectionPath to the AccessPath utility to
// avoid this hack.
if (!isa<EndCOWMutationInst>(Iter) && !isa<BeginAccessInst>(Iter) &&
!isa<BeginBorrowInst>(Iter)) {
!isa<BeginBorrowInst>(Iter) && !isa<MoveValueInst>(Iter)) {
Projection AP(Iter);
if (!AP.isValid())
break;