mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[sil-opaque-values] Fix SILGen and ownership of open_existential_box_value.
This commit is contained in:
@@ -905,9 +905,8 @@ SILGenFunction::emitOpenExistential(
|
||||
loweredOpenedType));
|
||||
} else {
|
||||
assert(!silConv.useLoweredAddresses());
|
||||
archetypeMV = ManagedValue::forUnmanaged(
|
||||
B.createOpenExistentialBoxValue(loc, existentialValue.getValue(),
|
||||
loweredOpenedType));
|
||||
archetypeMV = getBuilder().createOpenExistentialBoxValue(
|
||||
loc, existentialValue, loweredOpenedType);
|
||||
}
|
||||
// NB: Don't forward the cleanup, because consuming a boxed value won't
|
||||
// consume the box reference.
|
||||
|
||||
Reference in New Issue
Block a user