Skip to content

Commit 73ccf1c

Browse files
committed
[NFC] IRGen: Extracted method.
1 parent a82140b commit 73ccf1c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/IRGen/Outlining.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,15 @@ void OutliningMetadataCollector::collectTypeMetadata(SILType ty) {
5252
}
5353
}
5454

55-
if (!needsLayout) {
55+
collectTypeMetadataForLayout(ty);
56+
}
57+
58+
void OutliningMetadataCollector::collectTypeMetadataForLayout(SILType ty) {
59+
if (!needsLayout)
5660
return;
57-
}
61+
62+
auto astType = ty.getASTType();
63+
auto &ti = IGF.IGM.getTypeInfoForLowered(astType);
5864

5965
// We don't need the metadata for fixed size types or types that are not ABI
6066
// accessible. Outlining will call the value witness of the enclosing type of

lib/IRGen/Outlining.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class OutliningMetadataCollector {
9090
Explosion &params) const;
9191

9292
private:
93+
void collectTypeMetadataForLayout(SILType type);
9394
void collectFormalTypeMetadata(CanType type);
9495
void collectRepresentationTypeMetadata(SILType ty);
9596
};

0 commit comments

Comments
 (0)