Skip to content

Commit 71adae4

Browse files
committed
[gardening] Cleanup SILDefaultWitnessTable before I change it.
Just to make review easier.
1 parent 2eceb29 commit 71adae4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7687,26 +7687,26 @@ void SILWitnessTable::verify(const SILModule &M) const {
76877687
}
76887688

76897689
/// Verify that a default witness table follows invariants.
7690-
void SILDefaultWitnessTable::verify(const SILModule &M) const {
7690+
void SILDefaultWitnessTable::verify(const SILModule &mod) const {
76917691
#ifndef NDEBUG
7692-
for (const Entry &E : getEntries()) {
7692+
for (const Entry &entry : getEntries()) {
76937693
// FIXME: associated type witnesses.
7694-
if (!E.isValid() || E.getKind() != SILWitnessTable::Method)
7694+
if (!entry.isValid() || entry.getKind() != SILWitnessTable::Method)
76957695
continue;
76967696

7697-
SILFunction *F = E.getMethodWitness().Witness;
7698-
if (!F)
7697+
auto *witnessFunction = entry.getMethodWitness().Witness;
7698+
if (!witnessFunction)
76997699
continue;
77007700

77017701
#if 0
77027702
// FIXME: For now, all default witnesses are private.
7703-
assert(F->hasValidLinkageForFragileRef(IsSerialized) &&
7703+
assert(witnessFunction->hasValidLinkageForFragileRef(IsSerialized) &&
77047704
"Default witness tables should not reference "
77057705
"less visible functions.");
77067706
#endif
77077707

7708-
assert(F->getLoweredFunctionType()->getRepresentation() ==
7709-
SILFunctionTypeRepresentation::WitnessMethod &&
7708+
assert(witnessFunction->getLoweredFunctionType()->getRepresentation() ==
7709+
SILFunctionTypeRepresentation::WitnessMethod &&
77107710
"Default witnesses must have witness_method representation.");
77117711
}
77127712
#endif

0 commit comments

Comments
 (0)