Commit Graph

11 Commits

Author SHA1 Message Date
Alastair Houghton
6f8b2ef9e5 [Runtime] Fix swift_weakTakeStrong().
It turns out that when taking the last weak reference for an object that
has been deallocated, we might have returned a non-null pointer when we
shouldn't have.  Which is exciting.

rdar://106375185
2023-04-14 19:15:38 +01:00
Egor Zhdan
84a1ffcb33 [Shims] Include SwiftShims headers without ../
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).
2022-09-14 11:14:50 +01:00
Robert Widmann
0149ccd0ca Add arm64_32 support for Swift
Commit the platform definition and build script work necessary to
cross-compile for arm64_32.

arm64_32 is a variant of AARCH64 that supports an ILP32 architecture.
2021-04-20 14:59:04 -07:00
Saleem Abdulrasool
61ddd09199 runtime: replace LLVM_ATTRIBUTE_ALWAYS_INLINE with SWIFT_INLINE (NFC)
This replaces the `LLVM_ATTRIBUTE_ALWAYS_INLINE` with `SWIFT_INLINE`
which is equivalent but namespaced to Swift instead.  This reduces the
unnecessary reliance on LLVMSupport.
2020-05-05 11:19:15 -07:00
rposts
12be5b598c ConfigureSystemZ changes 2018-11-09 17:27:58 -05:00
Saleem Abdulrasool
1ed7874596 Runtime: silence some warnings
Silence warnings about deleted defaulted constructors due to the
non-trivial constructor for the atomic type.  Guard a conditionally used
function with the appropriate guard.
2018-11-04 20:30:34 -08:00
Mike Ash
fa4178c5e8 [IRGen][Runtime] Adjust the ObjC reserved bits on x86-64 to exactly match what the target uses.
Previously we had a single mask for all x86-64 targets which included both the top and bottom bits. This accommodated simulators, which use the top bit, while macOS uses the bottom bit, but reserved one bit more than necessary on each. This change breaks out x86-64 simulators from non-simulators and reserves only the one bit used on each.

rdar://problem/34805348 rdar://problem/29765919
2018-10-04 12:34:08 -04:00
Saleem Abdulrasool
2d04b8491b stdlib: check for ARM/ARM64 more thoroughly (NFC)
Update the instances of checks for architectures to be more broad for different
spellings of the architecture macro.  Certain targets use `_M_ARM` and others
use `__arm__`.  Similarly, arm64/aarch64 has `_M_ARM64`, `__arm64__` and
`__aarch64__` as spellings.  This just mechanically goes through and encodes the
various spellings.

Take the opportunity to replace some raw checks with `defined` checks which
avoids a pedantic warning due to the undefined macro when performing the check
as the preprocessor may warn about an undefined condition evaluating to `0`.
2018-09-21 11:24:03 -07:00
practicalswift
57fa66e9fe [gardening] Fix inconsistent headers 2017-02-28 17:15:39 +01:00
practicalswift
3c57c94d45 [gardening] Fix incorrect Swift URLs 2017-02-28 17:14:05 +01:00
Greg Parker
ae1c984920 New refcount representation (#5282)
New refcount representation and weak variable implementation. See SwiftShims/RefCount.h for details.
2017-02-24 14:19:11 -08:00