mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Cross-references are identified by their containing module, with the assumption that two modules will never have the same name. However, an overlay has the same name as its underlying Clang module, which means that there can be two declarations with the same name, the same type, and the same module name. This is the underlying cause of the 'UIEdgeInsetsZero' problem, but it also affects the CloudKit overlay. By tracking a bit that just says "this came from Clang", we're able to resolve otherwise ambiguous cross-references. (Why didn't we do it this way all along? Because if a declaration moves from Clang to Swift or vice versa, that would break the cross-reference. But that's only interesting if the swiftmodule format is meant to be persistent across changing dependencies, and it looks like we're moving away from that anyway. It's also a little weird for SerializedModuleLoader to have special cases for Clang, but this isn't the first.) Note that I'm not reverting the UIEdgeInsetsZero workaround here; the end state will have that coming just from UIKit as originally described. rdar://problem/40839486
49 KiB
49 KiB