Skip to content

Commit 0c6ac60

Browse files
committed
IRGen: Don't deserialize witness tables accidentally
This is actually NFC: We should have already deserialized everything we need at this point, and because of large loadable types and address lowering, deserializing more stuff in IRGen is not valid, and in fact we check for this and refuse to deserialize.
1 parent d7bd071 commit 0c6ac60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ bool IRGenerator::canEmitWitnessTableLazily(SILWitnessTable *wt) {
769769
}
770770

771771
void IRGenerator::addLazyWitnessTable(const ProtocolConformance *Conf) {
772-
if (SILWitnessTable *wt = SIL.lookUpWitnessTable(Conf)) {
772+
if (auto *wt = SIL.lookUpWitnessTable(Conf, /*deserializeLazily=*/false)) {
773773
// Add it to the queue if it hasn't already been put there.
774774
if (canEmitWitnessTableLazily(wt) &&
775775
LazilyEmittedWitnessTables.insert(wt).second) {

0 commit comments

Comments
 (0)