[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:
QuietMisdreavus
2025-07-01 01:30:15 -06:00
committed by GitHub
parent d9bc9a2238
commit a75f94eef4
7 changed files with 50 additions and 7 deletions

View File

@@ -137,6 +137,8 @@ config.swift_stdlib_enable_objc_interop = "@SWIFT_STDLIB_ENABLE_OBJC_INTEROP@" =
# Configured in DarwinSDKs.cmake
config.freestanding_sdk_name = "@SWIFT_SDK_FREESTANDING_LIB_SUBDIR@"
config.swift_sdks = "@SWIFT_SDKS@".split(";")
# Let the main config do the real work.
config.test_exec_root = os.path.dirname(os.path.realpath(__file__))
lit_config.load_config(config, os.path.join(config.test_exec_root, "lit.swift-features.cfg"))