Skip to content

Commit 640e398

Browse files
committed
[SIL] Only verify ownership when not disabled.
The option -disable-sil-ownership-verifier should almost never be used. But if it is, it should result in ownership verification being disabled, even when done via direct calls to `SILFunction::verifyOwnership`. There are still a couple of test cases that use -disable-sil-ownership-verifier.
1 parent a31d15c commit 640e398

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/SIL/Verifier/SILOwnershipVerifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,8 @@ void SILModule::verifyOwnership() const {
914914
void SILFunction::verifyOwnership(DeadEndBlocks *deadEndBlocks) const {
915915
if (DisableOwnershipVerification)
916916
return;
917+
if (!getModule().getOptions().VerifySILOwnership)
918+
return;
917919

918920
#ifdef NDEBUG
919921
// When compiling without asserts enabled, only verify ownership if

0 commit comments

Comments
 (0)