Skip to content

Commit b98679b

Browse files
committed
[NFC] TypeLowering: Extracted one field verify.
Moved verification of lexical field into its own function in preparation for verifying a second field.
1 parent 2557183 commit b98679b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/swift/SIL/TypeLowering.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,9 @@ class TypeConverter {
12821282
void verifyLowering(const TypeLowering &, AbstractionPattern origType,
12831283
CanType origSubstType,
12841284
TypeExpansionContext forExpansion);
1285+
void verifyLexicalLowering(const TypeLowering &, AbstractionPattern origType,
1286+
CanType origSubstType,
1287+
TypeExpansionContext forExpansion);
12851288
bool visitAggregateLeaves(
12861289
Lowering::AbstractionPattern origType, CanType substType,
12871290
TypeExpansionContext context,

lib/SIL/IR/TypeLowering.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,13 @@ void TypeConverter::verifyLowering(const TypeLowering &lowering,
29412941
AbstractionPattern origType,
29422942
CanType substType,
29432943
TypeExpansionContext forExpansion) {
2944+
verifyLexicalLowering(lowering, origType, substType, forExpansion);
2945+
}
2946+
2947+
void TypeConverter::verifyLexicalLowering(const TypeLowering &lowering,
2948+
AbstractionPattern origType,
2949+
CanType substType,
2950+
TypeExpansionContext forExpansion) {
29442951
// Non-trivial lowerings should always be lexical unless all non-trivial
29452952
// fields are eager move.
29462953
if (!lowering.isTrivial() && !lowering.isLexical()) {

0 commit comments

Comments
 (0)