* Add concrete overload for on all stdlib integer types.
* Add very basic tests for type inference of comparands.
* Add a comment explaining why these overloads are present.
LLVM might not be build with support for all architectures to save time.
The changes in this commit check the value of LLVM_TARGETS_TO_BUILD
provided by LLVMConfig.cmake to add or skip the different embedded
targets if LLVM happens to not build with support for that target.
While x86_64 and ARM/AArch64 are very common in `LLVM_TARGETS_TO_BUILD`,
targets like RISCV are more specialized and might not be always enabled.
This is not a problem for builds using the `build-script` because of the
changes introduced in #70057, but it is still a problem for other builds
that do not use `build-script`. This solution should work for any build.
This removes a special case in the compiler for these types, and applies the `import_owned` attribute to all instantiations of `vector` and `basic_string` via API Notes.
The static bridgeableProtocol inherits the ptrauth_struct attribute which uses the B key, and that's not allowed on global data in the shared cache. Pass the value directly as a parameter instead.
With `NoncopyableGenerics` enabled, we currently lose some ability for
associatedtype inference to find a suitable type witness based on a
value witness. (rdar://118998138)
The stdlib accidentally uses that inference for Sequence.Element,
due to the default witness for `_customContainsEquatableElement`
mentioning `Iterator.Element` whereas the requirement only states
`Element`.
* docs: improve withTaskCancellationHandler docs
* prefer using non-deprecated withCancHandler method
* Apply suggestions from code review
Co-authored-by: Alex Martini <amartini@apple.com>
---------
Co-authored-by: Alex Martini <amartini@apple.com>
rdar://118606044
The initWithTakeTable accidentally referenced bridgeRetain instead of copyingInitWithTake, which caused a leak when an object containing a bridge reference was also not bitwise takable.
Accessing the thread context structures is complicated because their
member variables change name depending on various macros. This caused
a build failure for ARM64e.
rdar://118402226
These class methods are internal, but because they are overridden and are
part of a `@usableFromInline`, `@_fixed_layout` class, we they can't be
moved over to typed throws without breaking ABI. However, they are
only ever called from typed-throws functions, which already need a
do...catch dance to downcast the error itself. Make them `throws`
instead, which is ABI-compatible, but eliminates the need for
do...catch hackery in the function itself.
Replace the hackish use of `@_disfavoredOverload` with the more principled
use of `@_silgen_name` for the entrypoint we are maintaining, then rename
these functions in source to `__rethrows_map` to indicate what they're for.
While here, make them `throws` instead of `rethrows`. The ABI is the
same, and `throws` allows us do avoid to do/catch tricks with rethrows
functions.