Skip to content

Commit f0e52db

Browse files
committed
AddressLowering: Handle opaque use in ValueMetatypeInst
1 parent 8a1ce59 commit f0e52db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/SILOptimizer/Mandatory/AddressLowering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,6 +2598,12 @@ class UseRewriter : SILInstructionVisitor<UseRewriter> {
25982598
yield->setOperand(0, addr);
25992599
}
26002600

2601+
void visitValueMetatypeInst(ValueMetatypeInst *vmi) {
2602+
auto opAddr =
2603+
pass.valueStorageMap.getStorage(vmi->getOperand()).storageAddress;
2604+
vmi->setOperand(opAddr);
2605+
}
2606+
26012607
void visitAssignInst(AssignInst *assignInst);
26022608

26032609
void visitBeginBorrowInst(BeginBorrowInst *borrow);

0 commit comments

Comments
 (0)