Raw identifiers are backtick-delimited identifiers that can contain any
non-identifier character other than the backtick itself, CR, LF, or other
non-printable ASCII code units, and which are also not composed entirely
of operator characters.
`TypeRoundTrip/round-trip.swift` tries to link with `libswiftRemoteInspection`,
but that library isn't in the default link path, so we need to add a `-L`
option to the command line in the test.
Also, we should check that `SWIFT_BUILD_REMOTE_MIRROR` is enabled and
disable the test if not, because otherwise `libswiftRemoteInspection` won't
have been built.
rdar://123503470
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```
This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
Moved all the threading code to one place. Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.
rdar://90776105
Moved all the threading code to one place. Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.
rdar://90776105
This feature allows the following construct to work:
protocol P1 {
associatedtype T : P1
}
protocol P2 {
associatedtype T : P2
}
func foo<T : P1 & P2>(_: T) {}
However, I haven't figured out how to make it work with rewrite system
minimization, so it's already disabled when you use the requirement
machine for protocol or generic signature minimization. In addition to
that it adds some complexity.
I haven't found any real-world uses of this pattern yet, so I'm going
to try to turn it off, and if nobody complains, remove the support
altogether.
If people do complain, we'll have to figure out how to make it work with
minimization.
When use_os_stdlib is set, we use the system Swift libraries, rather than
the ones we've just built. Older Swift libraries don't have some of the
required functions to run this test, and since the test is supposed to be
testing the library rather than the compiler, it makes sense to just mark
it as unsupported in that configuration.
Apparently we can write a type with @convention(block) on Linux, which is
entertaining because when we touch the metadata for such a thing in the
runtime, we fail with an assert(), assuming assertions are enabled.
The round-trip test was relying on a host library, but that only works where
we aren't cross-compiling. Using a target library instead was a little more
complicated than it looked because libswiftDemangling doesn't get built for
the target. However, it *is* part of the other Swift libraries on the host,
but there's an extra namespace shoehorned in.
Added a new test to the test suite that round trips Swift types through
mangled names and checks that we get the same type back that we started
with.
rdar://37170485