swift
9e057e5c - [cxx-interop] Guard Span-referencing declarations in Cxx module interface behind version check

Commit
15 days ago
[cxx-interop] Guard Span-referencing declarations in Cxx module interface behind version check When a newer toolchain (Swift >=6.2) is used with an older SDK whose stdlib predates Swift 6.2, the Cxx module interface references `Swift.Span` and `Swift.MutableSpan` which don't exist in the older stdlib, causing build failures. Guard individual declarations in the Cxx overlay that reference `Span`/`MutableSpan` behind `#if canImport(Swift, _version: 6.2)`. The guard wraps (rather than replaces) existing feature-based guards like `$LifetimeDependence`, so both compiler capability and stdlib availability are checked. rdar://176312542
Committer
Parents
Loading