Skip to content

Commit 2c3ee09

Browse files
committed
SILOptimizer: Fix invariant violation in usePrespecialized()
The conformances no longer match the replacement types after the transformation here, so we must look them up again. This is now flagged by SubstitutionMap::verify().
1 parent a8bca07 commit 2c3ee09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Utils/Generics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ static bool usePrespecialized(
31373137

31383138
auto newSubstMap = SubstitutionMap::get(
31393139
apply.getSubstitutionMap().getGenericSignature(), newSubs,
3140-
apply.getSubstitutionMap().getConformances());
3140+
LookUpConformanceInModule());
31413141

31423142
ReabstractionInfo layoutReInfo = ReabstractionInfo(
31433143
funcBuilder.getModule().getSwiftModule(),

0 commit comments

Comments
 (0)