Skip to content

Commit 94f0ffd

Browse files
committed
IRGen: Don't emit reflection metadata for builtin types unless we're building the standard library
I couldn't reduce a test case, but it seems to come up with optimizations enabled. We should have already emitted metadata for everything when we built the stdlib, no need to do it again. Fixes <rdar://problem/28924516>.
1 parent 7a3a1e3 commit 94f0ffd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/GenReflection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class ReflectionMetadataBuilder : public ConstantBuilder<> {
180180
// Collect any builtin types referenced from this type.
181181
void addBuiltinTypeRefs(CanType type) {
182182
type.visit([&](Type t) {
183-
if (t->is<BuiltinType>())
183+
if (IGM.getSwiftModule()->isStdlibModule() && t->is<BuiltinType>())
184184
IGM.BuiltinTypes.insert(CanType(t));
185185

186186
// We need size/alignment information for imported value types,

0 commit comments

Comments
 (0)