mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[OpaqueValues] Addr-only consumes emit loadably.
This commit is contained in:
@@ -6199,7 +6199,7 @@ RValue RValueEmitter::visitConsumeExpr(ConsumeExpr *E, SGFContext C) {
|
||||
return RValue(SGF, {optTemp->getManagedAddress()}, subType.getASTType());
|
||||
}
|
||||
|
||||
if (subType.isLoadable(SGF.F)) {
|
||||
if (subType.isLoadable(SGF.F) || !SGF.useLoweredAddresses()) {
|
||||
ManagedValue mv = SGF.emitRValue(subExpr).getAsSingleValue(SGF, subExpr);
|
||||
if (mv.getType().isTrivial(SGF.F))
|
||||
return RValue(SGF, {mv}, subType.getASTType());
|
||||
|
||||
Reference in New Issue
Block a user