@@ -910,19 +910,6 @@ void SILValue::verifyOwnership(DeadEndBlocks *deadEndBlocks) const {
910
910
if (isa<SILUndef>(*this ))
911
911
return ;
912
912
913
- #ifdef NDEBUG
914
- // When compiling without asserts enabled, only verify ownership if
915
- // -sil-verify-all is set.
916
- //
917
- // NOTE: We purposely return if we do can not look up a module here to ensure
918
- // that if we run into something that we do not understand, we do not assert
919
- // in user code even though we aren't going to actually verify (the default
920
- // behavior when -sil-verify-all is disabled).
921
- auto *mod = Value->getModule ();
922
- if (!mod || !mod->getOptions ().VerifyAll )
923
- return ;
924
- #endif
925
-
926
913
// Make sure that we are not a value of an instruction in a SILGlobalVariable
927
914
// block.
928
915
if (auto *definingInst = getDefiningInstruction ()) {
@@ -955,13 +942,6 @@ void SILModule::verifyOwnership() const {
955
942
if (DisableOwnershipVerification)
956
943
return ;
957
944
958
- #ifdef NDEBUG
959
- // When compiling without asserts enabled, only verify ownership if
960
- // -sil-verify-all is set.
961
- if (!getOptions ().VerifyAll )
962
- return ;
963
- #endif
964
-
965
945
for (const SILFunction &function : *this ) {
966
946
std::unique_ptr<DeadEndBlocks> deBlocks;
967
947
if (!getOptions ().OSSAVerifyComplete ) {
@@ -978,19 +958,6 @@ void SILFunction::verifyOwnership(DeadEndBlocks *deadEndBlocks) const {
978
958
if (!getModule ().getOptions ().VerifySILOwnership )
979
959
return ;
980
960
981
- #ifdef NDEBUG
982
- // When compiling without asserts enabled, only verify ownership if
983
- // -sil-verify-all is set.
984
- //
985
- // NOTE: We purposely return if we do can not look up a module here to ensure
986
- // that if we run into something that we do not understand, we do not assert
987
- // in user code even though we aren't going to actually verify (the default
988
- // behavior when -sil-verify-all is disabled).
989
- auto *mod = &getModule ();
990
- if (!mod || !mod->getOptions ().VerifyAll )
991
- return ;
992
- #endif
993
-
994
961
// If the given function has unqualified ownership or we have been asked by
995
962
// the user not to verify this function, there is nothing to verify.
996
963
if (!hasOwnership () || !shouldVerifyOwnership ())
0 commit comments