LLVM ought to be able to do this transformation for us, but it currently fails to do so. We can code around it easily enough. https://github.com/swiftlang/swift/pull/83172 has a better long-term fix.
build-script: allow `--test-wasm-stdlib` without `--build-wasm-stdlib`
This allows testing Wasm stdlib without fully rebuilding WASI sysroot and stdlib, while changes to stdlib itself are still detected by ninja as dependencies and are built incrementally, which is great for local builds.
Install static XCTest library and its Swift module files in the following
directory structure:
```
usr/lib/swift_static/wasi/libXCTest.a
usr/lib/swift_static/wasi/XCTest.swiftmodule
```
Xcode puts clang command line arguments in a single line in .resp files.
Split the argument printing routine into its own function print_arg.
When a clang response file is encountered, split each line into arguments and loop them through print_arg.
-c has an argument for clang
A substitution map contains conformances, and a conformance can contain
a substitution map. This will always be a DAG, but not a tree, and to
avoid exponential blowup in certain edge cases, let's cache the work to
avoid visiting the same substitution map repeatedly, if multiple
conformances refer to the same substitution map.
Now look through other opaque return types that appear in the
underlying type. This catches various forms of recursion that
otherwise would cause a SILGen or SILOptimizer crash.
- Fixes rdar://82992151.
Tracking seen declarations and substitution maps only detects the
situation where the opaque type's underlying type contains itself
with the same substitution map. However, it is also possible to
recurse with a different substitution map.
In general termination is undecidable with a problem like this,
so instead of trying to catch cycles, just impose a termination
limit.
This converts a stack overflow into an assertion, which is still
not ideal; we should really diagnose something instead. But this
is a first step.
Use these queries to replace some duplicated code. Also, move the
`attr_inlinable_available.swift` test to the `Availability` sub-directory since
the test has more to do with availability checking than it has to do
specifically with the `@inlinable` attr.
We've started seeing build failures where the conformance of a `std::vector` instantiation to `CxxVector` is missing. This was because the LifetimeDependenceInfoRequest triggers the protocol conformance table for the instantiation to be built before the synthesized conformance gets added.
This works around the issue by preventing LifetimeDependenceInfoRequest from running for the synthesized default argument generator function, which was the culprit of this particular failure.
rdar://155977071