mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SIL-opaque] Don't override arg value category.
Previously, when emitting block arguments, the value category of the SILType was overridden to be address for indirect arguments. With opaque types, that distinction is made later during AddressLowering. So only do that when opaque types are disabled.
This commit is contained in:
@@ -78,8 +78,9 @@ public:
|
||||
SGF.SGM.Types.getLoweredType(t, TypeExpansionContext::minimal());
|
||||
argType = argType.getCategoryType(argTypeConv.getCategory());
|
||||
|
||||
if (isInOut
|
||||
|| orig.getParameterConvention(SGF.SGM.Types) == AbstractionPattern::Indirect)
|
||||
if (isInOut || (orig.getParameterConvention(SGF.SGM.Types) ==
|
||||
AbstractionPattern::Indirect &&
|
||||
SGF.SGM.M.useLoweredAddresses()))
|
||||
argType = argType.getCategoryType(SILValueCategory::Address);
|
||||
|
||||
// Pop the next parameter info.
|
||||
|
||||
Reference in New Issue
Block a user