* take the chance to rename the containing folder, as in this context it
should be clear we are talking about the Runtime module and not the
Swift runtime
* this will fail to build for Apple platforms until we land #84388 -- to
signal this, comment the invocations that would add the dependency on
the Darwin overlay
* piggyback a fix to ensure we rebuild always all the external projects
in the Supplemental superbuild used in macOS PR testing
Addresses rdar://160774902
Based on what I see from OwnershipModelEliminator,
`%x = load [copy] %y` can turn into a plain load
followed by a retain of the loaded value.
See `NonTrivialLoadableTypeLowering::emitLoad`
swift_coroFrameAlloc was introduced in the Swift 6.2 runtime. Give it
the appropriate availability in IRGen, so that it gets weak
availability when needed (per the deployment target). Then, only
create the stub function for calling into swift_coroFrameAlloc or
malloc (when the former isn't available) when we're back-deploying to
a runtime prior to Swift 6.2. This is a small code size/performance
win when allocating coroutine frames on Swift 6.2-or-newer platforms.
This has a side effect of fixing a bug in Embedded Swift, where the
swift_coroFrameAlloc was getting unconditionally set to have weak
external linkage despite behind defined in the same LLVM module
(because it comes from the standard library).
Fixes rdar://149695139 / issue #80947.
If a .swiftinterface file does not include an explicit `-language-mode` option
(or its predecessor `-swift-version`) and needs to be built as a dependency of a
client compilation, then the invocation to build the module from interface
would end up inheriting the language mode that the client code is built with.
This can result in spurious type checking diagnostics or even mis-compilation.
To ensure that a module interface is always built using the language mode that
its source code was originally built with, require an explicit `-language-mode`
option when emitting swiftinterface files.
In https://github.com/swiftlang/swift/pull/84307 this diagnostic was downgraded
to a warning. The failures it caused in PR testing should now be resolved.
Resolves rdar://145168219.
The compiler will soon require that any module with a `.swiftinterface` be
built with an explicit language mode specified on the command line. This
prevents misinterpretation of the `.swiftinterface` when building it for
clients that aren't building with the default language mode.
Add explicit `-swift-version` arguments to the builds of various Runtimes
libraries to comply with this new requirement.
`TypeChecker::resolveDeclRefExpr()` would leave error nodes in the AST when
performing fallback name lookups with `MemberImportVisibility`. When running in
migration mode for `MemberImportVisibility`, these error nodes would then cause
the compiler to either diagnose a missing error or to crash during SILGen.
Instead of restricting name lookup during `TypeChecker::resolveDeclRefExpr()`,
allow it to find candidates with missing imports and then diagnose them if
necessary before forming a resolve decl ref.
Resolves rdar://154361861.
When a module has been imported `@preconcurrency` in source, when it is printed
in a `swiftinterface` file it should be printed along with the attribute to
ensure that type checking of the module's public declarations behaves
consistently.
This fix is a little unsatisfying because it adds another a linear scan over
all imports in the source for each printed import. This should be improved, but
it can be done later.
Resolves rdar://136857313.
Downgrade the new error in https://github.com/swiftlang/swift/pull/84244 to a
warning.
The PR smoke test build is using a different build system that is failing to
pass `-swift-version` arguments when building various stdlib modules. That
needs to be fixed, but for now we also need to unblock CI.
When emitting diagnostics for the Embedded Swift restrictions outside
of Embedded Swift mode, consider `#if $Embedded` and `#if
hasFeature(Embedded)` configurations. If the code where we would emit
the diagnostic would be disabled in Embedded Swift by one of those
checks, don't emit the diagnostic. This helps code that can compile
either with Embedded or regular Swift stay within the restrictions on
Embedded Swift.
`KeyPath` types now have conformance requirements placed on their
`Root` and `Value` types which need to be checked even when there
is a key path to function conversion involved, otherwise the solver
would be accepting invalid code.
Note that without function conversion the requirements come from
a type opened during assignment - https://github.com/swiftlang/swift/pull/80081/files.
Resolves: https://github.com/swiftlang/swift/issues/84150
It uses a check on conformance to ForwardInstruction for walking down guaranteed forwarding uses.
Since apply of borrow accessors cannot be represented as ForwardingInstruction, handle them separately.
Representing apply of borrow accessors for consistent handling in the optimizer is TBD.