mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Support +0 values in ManagedValue::forwardInto()
This commit is contained in:
@@ -110,10 +110,15 @@ SILValue ManagedValue::forward(SILGenFunction &SGF) const {
|
||||
|
||||
void ManagedValue::forwardInto(SILGenFunction &SGF, SILLocation loc,
|
||||
SILValue address) {
|
||||
if (!hasCleanup() && getOwnershipKind() != ValueOwnershipKind::Trivial)
|
||||
return copyUnmanaged(SGF, loc).forwardInto(SGF, loc, address);
|
||||
|
||||
if (hasCleanup())
|
||||
forwardCleanup(SGF);
|
||||
|
||||
auto &addrTL = SGF.getTypeLowering(address->getType());
|
||||
SGF.emitSemanticStore(loc, getValue(), address, addrTL, IsInitialization);
|
||||
SGF.emitSemanticStore(loc, getValue(), address,
|
||||
addrTL, IsInitialization);
|
||||
}
|
||||
|
||||
void ManagedValue::assignInto(SILGenFunction &SGF, SILLocation loc,
|
||||
|
||||
Reference in New Issue
Block a user