Skip to content

Commit a868d92

Browse files
Merge pull request #83683 from nate-chandler/rdar158083136
[InlineArray] Fix outlining metadata collection.
2 parents 770c633 + 3078e95 commit a868d92

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lib/IRGen/GenArray.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ class ArrayTypeInfoBase : public BaseTypeInfo {
180180
Element.destroy(IGF, elt[0], eltTy, isOutlined);
181181
}, {address});
182182
}
183+
184+
void collectMetadataForOutlining(OutliningMetadataCollector &collector,
185+
SILType T) const override {
186+
auto &IGM = collector.IGF.IGM;
187+
auto elementTy = getElementSILType(IGM, T);
188+
IGM.getTypeInfo(elementTy).collectMetadataForOutlining(collector,
189+
elementTy);
190+
}
183191
};
184192

185193
template<typename BaseTypeInfo>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: %target-swift-frontend %s -disable-availability-checking -emit-ir
2+
3+
func f<let i: Int, T>(
4+
_: consuming InlineArray<i, (String, T)>
5+
) {
6+
}

0 commit comments

Comments
 (0)