mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
f0f91eedc9
With the generalization of Optional to support noncopyable types, our feature-guarding in swiftinterface files would double-print functions that simply refer to the Optional type. Since NoncopyableGenerics is a suppressible feature, by default a second version of Optional and UnsafePointer are emitted into swiftinterface files, where the ~Copyable generalization is stripped away. We can rely on that to avoid double-printing the function, if the types substituted for the generic parameters are all Copyable. We need a bit more checking for when `@_disallowFeatureSuppression(NoncopyableGenerics)` is used, since this trick relies on there always being a definition of the type we refer to, whether the feature is enabled or not. resolves rdar://127389991