mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[6.2] use RespectOriginallyDefinedIn when mangling extension contexts (#82657)
- **Explanation**: USR mangling can include an extension context infix (`AAE`) when an extended type uses `@_originallyDefinedIn` on platforms other than the active one. This adds a check for the `RespectOriginallyDefinedIn` flag when checking extension decls against their extended type. - **Scope**: Changes USR mangling in these situations so that USRs are the same for the same code regardless of platform. - **Issues**: rdar://152598492 - **Original PRs**: https://github.com/swiftlang/swift/pull/82348 - **Risk**: Low. The change is limited to situations where the name mangler is already disrespecting the alternate module name, and only additionally turns on that flag for any USR mangling. - **Testing**: Automated tests - **Reviewers**: @edymtt @augusto2112
This commit is contained in:
@@ -2135,7 +2135,10 @@ public:
|
||||
|
||||
/// Determine whether this extension context is in the same defining module as
|
||||
/// the original nominal type context.
|
||||
bool isInSameDefiningModule() const;
|
||||
///
|
||||
/// \param RespectOriginallyDefinedIn Whether to respect
|
||||
/// \c @_originallyDefinedIn attributes or the actual location of the decls.
|
||||
bool isInSameDefiningModule(bool RespectOriginallyDefinedIn = true) const;
|
||||
|
||||
/// Determine whether this extension is equivalent to one that requires at
|
||||
/// at least some constraints to be written in the source.
|
||||
|
||||
Reference in New Issue
Block a user