Skip to content

Commit 1056067

Browse files
committed
[Gardening] IRGen: Tweaked some variable names.
Made a function reasonably debuggable (type -> ty) and renamed misleading variable (formalType -> astType).
1 parent f0f9351 commit 1056067

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lib/IRGen/Outlining.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@
3232
using namespace swift;
3333
using namespace irgen;
3434

35-
void OutliningMetadataCollector::collectTypeMetadataForLayout(SILType type) {
35+
void OutliningMetadataCollector::collectTypeMetadataForLayout(SILType ty) {
3636
// If the type has no archetypes, we can emit it from scratch in the callee.
37-
if (!type.hasArchetype()) {
37+
if (!ty.hasArchetype()) {
3838
return;
3939
}
4040

4141
// Substitute opaque types if allowed.
42-
type =
43-
IGF.IGM.substOpaqueTypesWithUnderlyingTypes(type, CanGenericSignature());
42+
ty = IGF.IGM.substOpaqueTypesWithUnderlyingTypes(ty, CanGenericSignature());
4443

45-
auto formalType = type.getASTType();
46-
auto &ti = IGF.IGM.getTypeInfoForLowered(formalType);
44+
auto astType = ty.getASTType();
45+
auto &ti = IGF.IGM.getTypeInfoForLowered(astType);
4746

4847
// We don't need the metadata for fixed size types or types that are not ABI
4948
// accessible. Outlining will call the value witness of the enclosing type of
@@ -55,11 +54,11 @@ void OutliningMetadataCollector::collectTypeMetadataForLayout(SILType type) {
5554
// If the type is a legal formal type, add it as a formal type.
5655
// FIXME: does this force us to emit a more expensive metadata than we need
5756
// to?
58-
if (formalType->isLegalFormalType()) {
59-
return collectFormalTypeMetadata(formalType);
57+
if (astType->isLegalFormalType()) {
58+
return collectFormalTypeMetadata(astType);
6059
}
6160

62-
collectRepresentationTypeMetadata(type);
61+
collectRepresentationTypeMetadata(ty);
6362
}
6463

6564
void OutliningMetadataCollector::collectFormalTypeMetadata(CanType type) {

0 commit comments

Comments
 (0)