Skip to content

Commit 5594fc5

Browse files
committed
Collect builtins referenced by captures
If there are any builtin types referenced by closure captures [in the standard library], make sure to collect them so we emit reflection metadata for them in the builtin section.
1 parent 11faafe commit 5594fc5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/IRGen/GenReflection.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ class CaptureDescriptorBuilder : public ReflectionMetadataBuilder {
660660
for (auto CaptureType : CaptureTypes) {
661661
addTypeRef(Callee.getModule().getSwiftModule(), CaptureType,
662662
/*global*/ true);
663+
addBuiltinTypeRefs(CaptureType);
663664
}
664665

665666
// Add the pairs that make up the generic param -> metadata source map

0 commit comments

Comments
 (0)