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 @@ -4129,11 +4129,11 @@ template <bool InCallee>
4129
4129
bool isConsumedParameter (ParameterConvention conv) {
4130
4130
switch (conv) {
4131
4131
case ParameterConvention::Indirect_In:
4132
- case ParameterConvention::Indirect_In_CXX:
4133
4132
case ParameterConvention::Direct_Owned:
4134
4133
case ParameterConvention::Pack_Owned:
4135
4134
return true ;
4136
-
4135
+ case ParameterConvention::Indirect_In_CXX:
4136
+ return !InCallee;
4137
4137
case ParameterConvention::Indirect_Inout:
4138
4138
case ParameterConvention::Indirect_InoutAliasable:
4139
4139
case ParameterConvention::Direct_Unowned:
@@ -4164,10 +4164,10 @@ bool isGuaranteedParameter(ParameterConvention conv) {
4164
4164
case ParameterConvention::Indirect_In_Guaranteed:
4165
4165
case ParameterConvention::Pack_Guaranteed:
4166
4166
return true ;
4167
-
4167
+ case ParameterConvention::Indirect_In_CXX:
4168
+ return InCallee;
4168
4169
case ParameterConvention::Indirect_Inout:
4169
4170
case ParameterConvention::Indirect_InoutAliasable:
4170
- case ParameterConvention::Indirect_In_CXX:
4171
4171
case ParameterConvention::Indirect_In:
4172
4172
case ParameterConvention::Direct_Unowned:
4173
4173
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