@@ -145,19 +145,19 @@ class SILBuilder {
145
145
public:
146
146
explicit SILBuilder (SILFunction &F, bool isParsing = false )
147
147
: TempContext(F.getModule()), C(TempContext), F(&F),
148
- hasOwnership(F.hasQualifiedOwnership ()), BB(0 ) {
148
+ hasOwnership(F.hasOwnership ()), BB(0 ) {
149
149
C.isParsing = isParsing;
150
150
}
151
151
152
152
SILBuilder (SILFunction &F, SmallVectorImpl<SILInstruction *> *InsertedInstrs)
153
153
: TempContext(F.getModule(), InsertedInstrs), C(TempContext), F(&F),
154
- hasOwnership (F.hasQualifiedOwnership ()), BB(0 ) {}
154
+ hasOwnership (F.hasOwnership ()), BB(0 ) {}
155
155
156
156
explicit SILBuilder (SILInstruction *I,
157
157
SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0 )
158
158
: TempContext(I->getFunction ()->getModule(), InsertedInstrs),
159
159
C(TempContext), F(I->getFunction ()),
160
- hasOwnership(F->hasQualifiedOwnership ()) {
160
+ hasOwnership(F->hasOwnership ()) {
161
161
setInsertionPoint (I);
162
162
}
163
163
@@ -169,7 +169,7 @@ class SILBuilder {
169
169
SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0 )
170
170
: TempContext(BB->getParent ()->getModule(), InsertedInstrs),
171
171
C(TempContext), F(BB->getParent ()),
172
- hasOwnership(F->hasQualifiedOwnership ()) {
172
+ hasOwnership(F->hasOwnership ()) {
173
173
setInsertionPoint (BB);
174
174
}
175
175
@@ -180,7 +180,7 @@ class SILBuilder {
180
180
SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0 )
181
181
: TempContext(BB->getParent ()->getModule(), InsertedInstrs),
182
182
C(TempContext), F(BB->getParent ()),
183
- hasOwnership(F->hasQualifiedOwnership ()) {
183
+ hasOwnership(F->hasOwnership ()) {
184
184
setInsertionPoint (BB, InsertPt);
185
185
}
186
186
@@ -190,7 +190,7 @@ class SILBuilder {
190
190
// / SILBuilderContext must outlive this SILBuilder instance.
191
191
SILBuilder (SILInstruction *I, const SILDebugScope *DS, SILBuilderContext &C)
192
192
: TempContext(C.getModule()), C(C), F(I->getFunction ()),
193
- hasOwnership(F->hasQualifiedOwnership ()) {
193
+ hasOwnership(F->hasOwnership ()) {
194
194
assert (DS && " instruction has no debug scope" );
195
195
setCurrentDebugScope (DS);
196
196
setInsertionPoint (I);
@@ -202,7 +202,7 @@ class SILBuilder {
202
202
// / SILBuilderContext must outlive this SILBuilder instance.
203
203
SILBuilder (SILBasicBlock *BB, const SILDebugScope *DS, SILBuilderContext &C)
204
204
: TempContext(C.getModule()), C(C), F(BB->getParent ()),
205
- hasOwnership(F->hasQualifiedOwnership ()) {
205
+ hasOwnership(F->hasOwnership ()) {
206
206
assert (DS && " block has no debug scope" );
207
207
setCurrentDebugScope (DS);
208
208
setInsertionPoint (BB);
@@ -683,7 +683,7 @@ class SILBuilder {
683
683
LoadInst *createTrivialLoadOr (SILLocation Loc, SILValue LV,
684
684
LoadOwnershipQualifier Qualifier,
685
685
bool SupportUnqualifiedSIL = false ) {
686
- if (SupportUnqualifiedSIL && !getFunction ().hasQualifiedOwnership ()) {
686
+ if (SupportUnqualifiedSIL && !getFunction ().hasOwnership ()) {
687
687
assert (
688
688
Qualifier != LoadOwnershipQualifier::Copy &&
689
689
" In unqualified SIL, a copy must be done separately form the load" );
@@ -699,10 +699,10 @@ class SILBuilder {
699
699
LoadInst *createLoad (SILLocation Loc, SILValue LV,
700
700
LoadOwnershipQualifier Qualifier) {
701
701
assert ((Qualifier != LoadOwnershipQualifier::Unqualified) ||
702
- !getFunction ().hasQualifiedOwnership () &&
702
+ !getFunction ().hasOwnership () &&
703
703
" Unqualified inst in qualified function" );
704
704
assert ((Qualifier == LoadOwnershipQualifier::Unqualified) ||
705
- getFunction ().hasQualifiedOwnership () &&
705
+ getFunction ().hasOwnership () &&
706
706
" Qualified inst in unqualified function" );
707
707
assert (LV->getType ().isLoadableOrOpaque (getModule ()));
708
708
return insert (new (getModule ())
@@ -757,7 +757,7 @@ class SILBuilder {
757
757
SILValue DestAddr,
758
758
StoreOwnershipQualifier Qualifier,
759
759
bool SupportUnqualifiedSIL = false ) {
760
- if (SupportUnqualifiedSIL && !getFunction ().hasQualifiedOwnership ()) {
760
+ if (SupportUnqualifiedSIL && !getFunction ().hasOwnership ()) {
761
761
assert (
762
762
Qualifier != StoreOwnershipQualifier::Assign &&
763
763
" In unqualified SIL, assigns must be represented via 2 instructions" );
@@ -773,10 +773,10 @@ class SILBuilder {
773
773
StoreInst *createStore (SILLocation Loc, SILValue Src, SILValue DestAddr,
774
774
StoreOwnershipQualifier Qualifier) {
775
775
assert ((Qualifier != StoreOwnershipQualifier::Unqualified) ||
776
- !getFunction ().hasQualifiedOwnership () &&
776
+ !getFunction ().hasOwnership () &&
777
777
" Unqualified inst in qualified function" );
778
778
assert ((Qualifier == StoreOwnershipQualifier::Unqualified) ||
779
- getFunction ().hasQualifiedOwnership () &&
779
+ getFunction ().hasOwnership () &&
780
780
" Qualified inst in unqualified function" );
781
781
return insert (new (getModule ()) StoreInst (getSILDebugLocation (Loc), Src,
782
782
DestAddr, Qualifier));
@@ -1128,22 +1128,22 @@ class SILBuilder {
1128
1128
1129
1129
RetainValueInst *createRetainValue (SILLocation Loc, SILValue operand,
1130
1130
Atomicity atomicity) {
1131
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1131
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1132
1132
assert (operand->getType ().isLoadableOrOpaque (getModule ()));
1133
1133
return insert (new (getModule ()) RetainValueInst (getSILDebugLocation (Loc),
1134
1134
operand, atomicity));
1135
1135
}
1136
1136
1137
1137
RetainValueAddrInst *createRetainValueAddr (SILLocation Loc, SILValue operand,
1138
1138
Atomicity atomicity) {
1139
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1139
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1140
1140
return insert (new (getModule ()) RetainValueAddrInst (
1141
1141
getSILDebugLocation (Loc), operand, atomicity));
1142
1142
}
1143
1143
1144
1144
ReleaseValueInst *createReleaseValue (SILLocation Loc, SILValue operand,
1145
1145
Atomicity atomicity) {
1146
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1146
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1147
1147
assert (operand->getType ().isLoadableOrOpaque (getModule ()));
1148
1148
return insert (new (getModule ()) ReleaseValueInst (getSILDebugLocation (Loc),
1149
1149
operand, atomicity));
@@ -1152,15 +1152,15 @@ class SILBuilder {
1152
1152
ReleaseValueAddrInst *createReleaseValueAddr (SILLocation Loc,
1153
1153
SILValue operand,
1154
1154
Atomicity atomicity) {
1155
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1155
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1156
1156
return insert (new (getModule ()) ReleaseValueAddrInst (
1157
1157
getSILDebugLocation (Loc), operand, atomicity));
1158
1158
}
1159
1159
1160
1160
UnmanagedRetainValueInst *createUnmanagedRetainValue (SILLocation Loc,
1161
1161
SILValue operand,
1162
1162
Atomicity atomicity) {
1163
- assert (getFunction ().hasQualifiedOwnership ());
1163
+ assert (getFunction ().hasOwnership ());
1164
1164
assert (operand->getType ().isLoadableOrOpaque (getModule ()));
1165
1165
return insert (new (getModule ()) UnmanagedRetainValueInst (
1166
1166
getSILDebugLocation (Loc), operand, atomicity));
@@ -1169,7 +1169,7 @@ class SILBuilder {
1169
1169
UnmanagedReleaseValueInst *createUnmanagedReleaseValue (SILLocation Loc,
1170
1170
SILValue operand,
1171
1171
Atomicity atomicity) {
1172
- assert (getFunction ().hasQualifiedOwnership ());
1172
+ assert (getFunction ().hasOwnership ());
1173
1173
assert (operand->getType ().isLoadableOrOpaque (getModule ()));
1174
1174
return insert (new (getModule ()) UnmanagedReleaseValueInst (
1175
1175
getSILDebugLocation (Loc), operand, atomicity));
@@ -1637,13 +1637,13 @@ class SILBuilder {
1637
1637
1638
1638
StrongRetainInst *createStrongRetain (SILLocation Loc, SILValue Operand,
1639
1639
Atomicity atomicity) {
1640
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1640
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1641
1641
return insert (new (getModule ()) StrongRetainInst (getSILDebugLocation (Loc),
1642
1642
Operand, atomicity));
1643
1643
}
1644
1644
StrongReleaseInst *createStrongRelease (SILLocation Loc, SILValue Operand,
1645
1645
Atomicity atomicity) {
1646
- assert (C.isParsing || !getFunction ().hasQualifiedOwnership ());
1646
+ assert (C.isParsing || !getFunction ().hasOwnership ());
1647
1647
return insert (new (getModule ()) StrongReleaseInst (
1648
1648
getSILDebugLocation (Loc), Operand, atomicity));
1649
1649
}
@@ -2080,7 +2080,7 @@ class SILBuilder {
2080
2080
// / lowering for the non-address value.
2081
2081
void emitDestroyValueOperation (SILLocation Loc, SILValue v) {
2082
2082
assert (!v->getType ().isAddress ());
2083
- if (F->hasQualifiedOwnership () &&
2083
+ if (F->hasOwnership () &&
2084
2084
v.getOwnershipKind () == ValueOwnershipKind::Any)
2085
2085
return ;
2086
2086
auto &lowering = getTypeLowering (v->getType ());
0 commit comments