OpaqueValues: support SILGen for copy expr

This doesn't cover AddressLowering of `explicit_copy_value`.
This commit is contained in:
Kavon Farvardin
2025-09-23 12:01:33 -07:00
parent 4a943d464d
commit b3b9d28a54
2 changed files with 12 additions and 1 deletions

View File

@@ -7323,7 +7323,7 @@ RValue RValueEmitter::visitCopyExpr(CopyExpr *E, SGFContext C) {
return RValue(SGF, {optTemp->getManagedAddress()}, subType.getASTType());
}
if (subType.isLoadable(SGF.F)) {
if (subType.isLoadable(SGF.F) || !SGF.silConv.useLoweredAddresses()) {
ManagedValue mv =
SGF.emitRValue(subExpr, SGFContext::AllowImmediatePlusZero)
.getAsSingleValue(SGF, subExpr);