File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,10 @@ bool SILValueOwnershipChecker::gatherUsers(
346346 Operand *op = uses.pop_back_val ();
347347 SILInstruction *user = op->getUser ();
348348
349+ if (isa<UncheckedOwnershipInst>(user)) {
350+ continue ;
351+ }
352+
349353 // If this op is a type dependent operand, skip it. It is not interesting
350354 // from an ownership perspective.
351355 if (user->isTypeDependentOperand (*op))
Original file line number Diff line number Diff line change @@ -6711,6 +6711,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
67116711 " Result and operand must have the same type, today." );
67126712 }
67136713
6714+ void checkUncheckedOwnershipInst (UncheckedOwnershipInst *uoi) {
6715+ require (F.getModule ().getStage () == SILStage::Raw,
6716+ " unchecked_ownership is valid only in raw SIL" );
6717+ }
6718+
67146719 void checkAllocPackMetadataInst (AllocPackMetadataInst *apmi) {
67156720 require (apmi->getIntroducer ()->mayRequirePackMetadata (*apmi->getFunction ()),
67166721 " Introduces instruction of kind which cannot emit on-stack pack "
You can’t perform that action at this time.
0 commit comments