File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -4133,11 +4133,11 @@ template <bool InCallee>
4133
4133
bool isConsumedParameter (ParameterConvention conv) {
4134
4134
switch (conv) {
4135
4135
case ParameterConvention::Indirect_In:
4136
- case ParameterConvention::Indirect_In_CXX:
4137
4136
case ParameterConvention::Direct_Owned:
4138
4137
case ParameterConvention::Pack_Owned:
4139
4138
return true ;
4140
-
4139
+ case ParameterConvention::Indirect_In_CXX:
4140
+ return !InCallee;
4141
4141
case ParameterConvention::Indirect_Inout:
4142
4142
case ParameterConvention::Indirect_InoutAliasable:
4143
4143
case ParameterConvention::Direct_Unowned:
@@ -4168,10 +4168,10 @@ bool isGuaranteedParameter(ParameterConvention conv) {
4168
4168
case ParameterConvention::Indirect_In_Guaranteed:
4169
4169
case ParameterConvention::Pack_Guaranteed:
4170
4170
return true ;
4171
-
4171
+ case ParameterConvention::Indirect_In_CXX:
4172
+ return InCallee;
4172
4173
case ParameterConvention::Indirect_Inout:
4173
4174
case ParameterConvention::Indirect_InoutAliasable:
4174
- case ParameterConvention::Indirect_In_CXX:
4175
4175
case ParameterConvention::Indirect_In:
4176
4176
case ParameterConvention::Direct_Unowned:
4177
4177
case ParameterConvention::Direct_Owned:
Original file line number Diff line number Diff line change @@ -115,8 +115,9 @@ struct SILArgumentConvention {
115
115
case SILArgumentConvention::Direct_Owned:
116
116
case SILArgumentConvention::Pack_Owned:
117
117
return true ;
118
- case SILArgumentConvention::Indirect_In_Guaranteed:
119
118
case SILArgumentConvention::Indirect_In_CXX:
119
+ return !InCallee;
120
+ case SILArgumentConvention::Indirect_In_Guaranteed:
120
121
case SILArgumentConvention::Direct_Guaranteed:
121
122
case SILArgumentConvention::Indirect_Inout:
122
123
case SILArgumentConvention::Indirect_Out:
@@ -138,10 +139,11 @@ struct SILArgumentConvention {
138
139
bool isGuaranteedConvention () const {
139
140
switch (Value) {
140
141
case SILArgumentConvention::Indirect_In_Guaranteed:
141
- case SILArgumentConvention::Indirect_In_CXX:
142
142
case SILArgumentConvention::Direct_Guaranteed:
143
143
case SILArgumentConvention::Pack_Guaranteed:
144
144
return true ;
145
+ case SILArgumentConvention::Indirect_In_CXX:
146
+ return InCallee;
145
147
case SILArgumentConvention::Indirect_Inout:
146
148
case SILArgumentConvention::Indirect_In:
147
149
case SILArgumentConvention::Indirect_Out:
You can’t perform that action at this time.
0 commit comments