diff --git a/lib/IRGen/GenReflection.cpp b/lib/IRGen/GenReflection.cpp index 444d8cf4a5624..812a4ebeae097 100644 --- a/lib/IRGen/GenReflection.cpp +++ b/lib/IRGen/GenReflection.cpp @@ -180,7 +180,7 @@ class ReflectionMetadataBuilder : public ConstantBuilder<> { // Collect any builtin types referenced from this type. void addBuiltinTypeRefs(CanType type) { type.visit([&](Type t) { - if (t->is()) + if (IGM.getSwiftModule()->isStdlibModule() && t->is()) IGM.BuiltinTypes.insert(CanType(t)); // We need size/alignment information for imported value types,