@@ -1123,33 +1123,30 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1123
1123
case LoadOwnershipQualifier::Unqualified:
1124
1124
// We should not see loads with unqualified ownership when SILOwnership is
1125
1125
// enabled.
1126
- requireTrueAndSILOwnership (
1127
- this , F.hasUnqualifiedOwnership (),
1128
- " Load with unqualified ownership in a qualified function" );
1126
+ require (F.hasUnqualifiedOwnership (),
1127
+ " Load with unqualified ownership in a qualified function" );
1129
1128
break ;
1130
1129
case LoadOwnershipQualifier::Copy:
1131
1130
case LoadOwnershipQualifier::Take:
1132
- requireTrueAndSILOwnership (
1133
- this , F.hasQualifiedOwnership (),
1134
- " Load with qualified ownership in an unqualified function" );
1131
+ require (F.hasQualifiedOwnership (),
1132
+ " Load with qualified ownership in an unqualified function" );
1135
1133
// TODO: Could probably make this a bit stricter.
1136
1134
require (!LI->getType ().isTrivial (LI->getModule ()),
1137
1135
" load [copy] or load [take] can only be applied to non-trivial "
1138
1136
" types" );
1139
1137
break ;
1140
1138
case LoadOwnershipQualifier::Trivial:
1141
- requireTrueAndSILOwnership (
1142
- this , F.hasQualifiedOwnership (),
1143
- " Load with qualified ownership in an unqualified function" );
1139
+ require (F.hasQualifiedOwnership (),
1140
+ " Load with qualified ownership in an unqualified function" );
1144
1141
require (LI->getType ().isTrivial (LI->getModule ()),
1145
1142
" A load with trivial ownership must load a trivial type" );
1146
1143
break ;
1147
1144
}
1148
1145
}
1149
1146
1150
1147
void checkLoadBorrowInst (LoadBorrowInst *LBI) {
1151
- requireTrueAndSILOwnership (
1152
- this , F.hasQualifiedOwnership (),
1148
+ require (
1149
+ F.hasQualifiedOwnership (),
1153
1150
" Inst with qualified ownership in a function that is not qualified" );
1154
1151
require (LBI->getType ().isObject (), " Result of load must be an object" );
1155
1152
require (LBI->getType ().isLoadable (LBI->getModule ()),
@@ -1161,8 +1158,8 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1161
1158
}
1162
1159
1163
1160
void checkEndBorrowInst (EndBorrowInst *EBI) {
1164
- requireTrueAndSILOwnership (
1165
- this , F.hasQualifiedOwnership (),
1161
+ require (
1162
+ F.hasQualifiedOwnership (),
1166
1163
" Inst with qualified ownership in a function that is not qualified" );
1167
1164
// We allow for end_borrow to express relationships in between addresses and
1168
1165
// values, but we require that the types are the same ignoring value
@@ -1188,22 +1185,22 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
1188
1185
case StoreOwnershipQualifier::Unqualified:
1189
1186
// We should not see loads with unqualified ownership when SILOwnership is
1190
1187
// enabled.
1191
- requireTrueAndSILOwnership ( this , F.hasUnqualifiedOwnership (),
1192
- " Invalid load with unqualified ownership" );
1188
+ require ( F.hasUnqualifiedOwnership (),
1189
+ " Qualified store in function with unqualified ownership?! " );
1193
1190
break ;
1194
1191
case StoreOwnershipQualifier::Init:
1195
1192
case StoreOwnershipQualifier::Assign:
1196
- requireTrueAndSILOwnership (
1197
- this , F.hasQualifiedOwnership (),
1193
+ require (
1194
+ F.hasQualifiedOwnership (),
1198
1195
" Inst with qualified ownership in a function that is not qualified" );
1199
1196
// TODO: Could probably make this a bit stricter.
1200
1197
require (!SI->getSrc ()->getType ().isTrivial (SI->getModule ()),
1201
1198
" store [init] or store [assign] can only be applied to "
1202
1199
" non-trivial types" );
1203
1200
break ;
1204
1201
case StoreOwnershipQualifier::Trivial:
1205
- requireTrueAndSILOwnership (
1206
- this , F.hasQualifiedOwnership (),
1202
+ require (
1203
+ F.hasQualifiedOwnership (),
1207
1204
" Inst with qualified ownership in a function that is not qualified" );
1208
1205
require (SI->getSrc ()->getType ().isTrivial (SI->getModule ()),
1209
1206
" A store with trivial ownership must store a trivial type" );
0 commit comments