File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -3381,20 +3381,17 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
3381
3381
CBI->getCastType (),
3382
3382
" success dest block argument of checked_cast_br must match type of "
3383
3383
" cast" );
3384
- require (F.hasOwnership () || CBI->getFailureBB ()->args_empty (),
3385
- " failure dest of checked_cast_br in unqualified ownership sil must "
3386
- " take no arguments" );
3387
- #if 0
3388
- require(F.hasUnqualifiedOwnership() ||
3389
- CBI->getFailureBB()->args_size() == 1,
3384
+ require (!F.hasOwnership () || CBI->getFailureBB ()->args_size () == 1 ,
3390
3385
" failure dest of checked_cast_br must take one argument in "
3391
3386
" ownership qualified sil" );
3392
- require(F.hasUnqualifiedOwnership () ||
3387
+ require (!F. hasOwnership () ||
3393
3388
CBI->getFailureBB ()->args_begin ()[0 ]->getType () ==
3394
3389
CBI->getOperand ()->getType (),
3395
3390
" failure dest block argument must match type of original type in "
3396
3391
" ownership qualified sil" );
3397
- #endif
3392
+ require (F.hasOwnership () || CBI->getFailureBB ()->args_empty (),
3393
+ " Failure dest of checked_cast_br must not take any argument in "
3394
+ " non-ownership qualified sil" );
3398
3395
}
3399
3396
3400
3397
void checkCheckedCastValueBranchInst (CheckedCastValueBranchInst *CBI) {
You can’t perform that action at this time.
0 commit comments