Skip to content

Commit e25c664

Browse files
committed
[sil] Change SILDefaultWitnessTable verification to use verificationEnabled instead of #ifndef NDEBUG to match the rest of the SILVerifier.
I think this was just an oversight. There is really no reason that this should not match the rest of the SILVerifier w here we have moved from using #ifndef NDEBUG to verificationEnabled checking.
1 parent 71adae4 commit e25c664

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7688,7 +7688,9 @@ void SILWitnessTable::verify(const SILModule &M) const {
76887688

76897689
/// Verify that a default witness table follows invariants.
76907690
void SILDefaultWitnessTable::verify(const SILModule &mod) const {
7691-
#ifndef NDEBUG
7691+
if (!verificationEnabled(mod))
7692+
return;
7693+
76927694
for (const Entry &entry : getEntries()) {
76937695
// FIXME: associated type witnesses.
76947696
if (!entry.isValid() || entry.getKind() != SILWitnessTable::Method)
@@ -7709,7 +7711,6 @@ void SILDefaultWitnessTable::verify(const SILModule &mod) const {
77097711
SILFunctionTypeRepresentation::WitnessMethod &&
77107712
"Default witnesses must have witness_method representation.");
77117713
}
7712-
#endif
77137714
}
77147715

77157716
/// Verify that a global variable follows invariants.

0 commit comments

Comments
 (0)