File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -642,10 +642,20 @@ void SILValue::verifyOwnership(DeadEndBlocks *deadEndBlocks) const {
642
642
if (DisableOwnershipVerification)
643
643
return ;
644
644
645
+ // Do not validate SILUndef values.
646
+ if (isa<SILUndef>(Value))
647
+ return ;
648
+
645
649
#ifdef NDEBUG
646
650
// When compiling without asserts enabled, only verify ownership if
647
651
// -sil-verify-all is set.
648
- if (!getModule ().getOptions ().VerifyAll )
652
+ //
653
+ // NOTE: We purposely return if we do can not look up a module here to ensure
654
+ // that if we run into something that we do not understand, we do not assert
655
+ // in user code even tohugh we aren't going to actually verify (the default
656
+ // behavior when -sil-verify-all is disabled).
657
+ auto *Mod = Value->getModule ();
658
+ if (!Mod || !Mod->getOptions ().VerifyAll )
649
659
return ;
650
660
#endif
651
661
You can’t perform that action at this time.
0 commit comments