Skip to content

Commit 6b15585

Browse files
committed
Fix IRGen of rebind_memory to handle debug_value.
1 parent 76b30e3 commit 6b15585

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/IRGen/IRGenSIL.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6789,9 +6789,15 @@ void IRGenSILFunction::visitCopyAddrInst(swift::CopyAddrInst *i) {
67896789
// bind_memory and rebind_memory are no-ops because Swift TBAA info is not
67906790
// lowered to LLVM IR TBAA, and the output token is ignored except for
67916791
// verification.
6792-
void IRGenSILFunction::visitBindMemoryInst(swift::BindMemoryInst *) {}
6792+
void IRGenSILFunction::visitBindMemoryInst(swift::BindMemoryInst *i) {
6793+
LoweredValue &token = getUndefLoweredValue(i->getType());
6794+
setLoweredValue(i, std::move(token));
6795+
}
67936796

6794-
void IRGenSILFunction::visitRebindMemoryInst(swift::RebindMemoryInst *) {}
6797+
void IRGenSILFunction::visitRebindMemoryInst(swift::RebindMemoryInst *i) {
6798+
LoweredValue &token = getUndefLoweredValue(i->getType());
6799+
setLoweredValue(i, std::move(token));
6800+
}
67956801

67966802
void IRGenSILFunction::visitDestroyAddrInst(swift::DestroyAddrInst *i) {
67976803
SILType addrTy = i->getOperand()->getType();

0 commit comments

Comments
 (0)