Skip to content

[SR-13571] build release and debug variants of swiftrt.obj, swiftCore #70230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 57 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a8fc95b
[stdlib]Catch the reasonable mistake 'UnsafeRawMutableBufferPointer'
devKobe24 Nov 15, 2023
86a5010
[stdlidt]Restore Original File Code.
devKobe24 Nov 15, 2023
2ca5c32
[stdlib]Catch the reasonable mistake 'UnsafeRawMutableBufferPointer'
devKobe24 Nov 16, 2023
6818328
Merge branch 'apple:main' into develop-kobe
devKobe24 Nov 16, 2023
30faaa1
[stdlib]Catch the reasonable mistake 'UnsafeRawMutableBufferPointer'
devKobe24 Nov 16, 2023
243984d
[stdlib]fix typealias for written code to guide developers.
devKobe24 Nov 16, 2023
d1212f5
[stdlib]Catch the reasonable mistake 'UnsafeRawMutableBufferPointer'
devKobe24 Nov 16, 2023
66afef9
Merge pull request #3 from devKobe24/develop-kobe
devKobe24 Nov 16, 2023
af2964f
Merge remote-tracking branch 'origin-kobe/main'
devKobe24 Nov 16, 2023
23c7abd
Merge branch 'apple:main' into develop-kobe
devKobe24 Nov 16, 2023
8207d9f
Merge remote-tracking branch 'refs/remotes/origin/main'
devKobe24 Nov 17, 2023
7f816c7
[stdlib]Delete unnecessary file.
devKobe24 Nov 17, 2023
2573c4d
[stdlib]Restore the whitespace changes in the file to their original …
devKobe24 Nov 17, 2023
0a7c7ef
[stdlib]Add test case code.
devKobe24 Nov 17, 2023
38b4a68
Merge branch 'main' into develop-kobe
devKobe24 Nov 17, 2023
384fd44
Merge pull request #4 from devKobe24/develop-kobe
devKobe24 Nov 17, 2023
1151034
Merge branch 'apple:main' into main
devKobe24 Nov 18, 2023
174ea6d
Merge branch 'apple:main' into develop-kobe
devKobe24 Nov 18, 2023
ecd0975
Merge pull request #5 from devKobe24/develop-kobe
devKobe24 Nov 18, 2023
169973f
[stdlib]Delete unnecessary file.
devKobe24 Nov 18, 2023
15e7298
[stdlib]Add test case code.
devKobe24 Nov 18, 2023
49e3bca
Merge pull request #6 from devKobe24/develop-kobe
devKobe24 Nov 18, 2023
dcd46c6
[stdlib]Code indentation and line alignment adjustment.
devKobe24 Nov 18, 2023
46bd22a
[stdlib]Code indentation and line alignment adjustment.
devKobe24 Nov 18, 2023
5d2e934
Merge remote-tracking branch 'refs/remotes/develop-kobe/develop-kobe'…
devKobe24 Nov 27, 2023
ca229d1
Merge branch 'apple:main' into develop-kobe
devKobe24 Nov 27, 2023
c6e8086
Merge branch 'apple:main' into main
devKobe24 Nov 27, 2023
253a8cf
[Profiler] Fix ternary error handling coverage
hamishknight Nov 21, 2023
c311f6c
[Profiler] Correctly handle `try?` expressions
hamishknight Nov 21, 2023
b7d0244
[Profiler] Fix throwing expressions in if conditions
hamishknight Nov 21, 2023
66dd9b2
[swift-ide-test] Add support for -enable-upcoming-feature
NuriAmari Nov 17, 2023
504c324
[swift-ide-test] Tie ClangImporter fwd-decl option to chosen lang fea…
NuriAmari Nov 17, 2023
c2caa84
[Concurrency] Diagnose default values whose isolation differs from th…
hborla Nov 17, 2023
fb36bb5
[Concurrency] When isolated default values are enabled, synthesized i…
hborla Nov 17, 2023
7217641
[SIL] Addr-only enums have non-none ownership.
nate-chandler Nov 16, 2023
7ff6780
[ConstraintSystem] Key path literals with completion tokens should be…
xedin Nov 16, 2023
7267cba
[AST] Teach `InheritedProtocolsRequest` about synthesized protocol at…
xedin Nov 15, 2023
1422e8a
[RequirementMachine] Inherited requirements collection should account…
xedin Nov 15, 2023
e87a365
[NameLookup] Lift synthesized protocol check into `getDirectlyInherit…
xedin Nov 15, 2023
f3cd1cf
[Concurrency] Downgrade error about inherited Sendable classes inheri…
xedin Nov 16, 2023
0c1ba5d
[embedded] Start building embedded support on Linux/ELF, expand archs…
kubamracek Nov 18, 2023
403d9b7
[embedded] Avoid passing -D__APPLE__ on Linux builds
kubamracek Nov 18, 2023
eb43d0e
[embedded] Fix modules test expectations on Linux, skip LTO and Concu…
kubamracek Nov 18, 2023
9bac057
[embedded] Pass -pthreads in embedded/once-multithreaded.swift to lin…
kubamracek Nov 18, 2023
a045b79
Fix lit test Python/python_lint.swift
atrick Nov 18, 2023
3304ab2
[Sema] Remove `LeaveClosureBodiesUnchecked`
ahoppen Nov 23, 2023
802601c
[CodeComplete] Prefer function call if both reference and call are po…
ahoppen Nov 23, 2023
784ba20
[CodeComplete] Add test case for rdar://88883761
ahoppen Nov 23, 2023
b96d5ff
[CodeComplete] Add test case for #57148, #57149
ahoppen Nov 23, 2023
99d2b91
[embedded] Consider 'skipped' decls when SILGen-ing accessors, fix co…
kubamracek Nov 27, 2023
34142e3
Merge branch 'apple:main' into main
devKobe24 Nov 30, 2023
5c30206
Merge branch 'apple:main' into develop-kobe
devKobe24 Nov 30, 2023
14a000b
Merge pull request #8 from devKobe24/develop-kobe
devKobe24 Nov 30, 2023
9d5de0d
Merge branch 'apple:main' into main
devKobe24 Dec 1, 2023
77b21a0
Merge branch 'apple:main' into develop-kobe
devKobe24 Dec 5, 2023
b4a215d
Merge branch 'apple:main' into main
devKobe24 Dec 5, 2023
13d8ac2
Merge pull request #9 from devKobe24/develop-kobe
devKobe24 Dec 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions stdlib/public/core/UnsafeRawBufferPointer.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

%import gyb

@available(*, unavailable, renamed: "UnsafeMutableRawBufferPointer")
typealias UnsafeRawMutableBufferPointer = UnsafeMutableRawBufferPointer
% for mutable in (True, False):
% Self = 'UnsafeMutableRawBufferPointer' if mutable else 'UnsafeRawBufferPointer'
% Mutable = 'Mutable' if mutable else ''
Expand Down Expand Up @@ -515,7 +517,7 @@ extension Unsafe${Mutable}RawBufferPointer {
/// must be properly aligned for accessing `T`, and `source.count` must be a
/// multiple of `MemoryLayout<T>.stride`.
///
/// The memory referenced by `source` may overlap with the memory referenced
/// The memory referenced by `source` may overlap with the memory referenced
/// by this buffer.
///
/// After calling `copyMemory(from:)`, the first `source.count` bytes of
Expand Down Expand Up @@ -709,7 +711,7 @@ extension Unsafe${Mutable}RawBufferPointer {
/// initialized to a trivial type, and must be properly aligned for
/// accessing `T`.
///
/// After calling this method on a raw buffer with non-nil `baseAddress` `b`,
/// After calling this method on a raw buffer with non-nil `baseAddress` `b`,
/// the region starting at `b` and continuing up to
/// `b + self.count - self.count % MemoryLayout<T>.stride` is bound
/// to type `T` and is initialized. If `T` is a nontrivial type, you must
Expand All @@ -720,8 +722,8 @@ extension Unsafe${Mutable}RawBufferPointer {
/// - Parameters:
/// - type: The type to bind this buffer’s memory to.
/// - repeatedValue: The instance to copy into memory.
/// - Returns: A typed buffer of the memory referenced by this raw buffer.
/// The typed buffer contains `self.count / MemoryLayout<T>.stride`
/// - Returns: A typed buffer of the memory referenced by this raw buffer.
/// The typed buffer contains `self.count / MemoryLayout<T>.stride`
/// instances of `T`.
@inlinable
@discardableResult
Expand Down Expand Up @@ -775,20 +777,20 @@ extension Unsafe${Mutable}RawBufferPointer {
"insufficient space to accommodate source.underestimatedCount elements")
guard let base = baseAddress else {
// this can be a precondition since only an invalid argument should be costly
_precondition(source.underestimatedCount == 0,
_precondition(source.underestimatedCount == 0,
"no memory available to initialize from source")
return (it, UnsafeMutableBufferPointer(start: nil, count: 0))
}
}

_debugPrecondition(
Int(bitPattern: base) % MemoryLayout<S.Element>.stride == 0,
"buffer base address must be properly aligned to access S.Element"
)

_internalInvariant(_end != nil)
for p in stride(from: base,
for p in stride(from: base,
// only advance to as far as the last element that will fit
to: _end._unsafelyUnwrappedUnchecked - elementStride + 1,
to: _end._unsafelyUnwrappedUnchecked - elementStride + 1,
by: elementStride
) {
// underflow is permitted -- e.g. a sequence into
Expand All @@ -799,7 +801,7 @@ extension Unsafe${Mutable}RawBufferPointer {
}

return (it, UnsafeMutableBufferPointer(
start: base.assumingMemoryBound(to: S.Element.self),
start: base.assumingMemoryBound(to: S.Element.self),
count: idx / elementStride))
}

Expand Down Expand Up @@ -983,7 +985,7 @@ extension Unsafe${Mutable}RawBufferPointer {

% end # mutable

/// Binds this buffer’s memory to the specified type and returns a typed buffer
/// Binds this buffer’s memory to the specified type and returns a typed buffer
/// of the bound memory.
///
/// Use the `bindMemory(to:)` method to bind the memory referenced
Expand Down Expand Up @@ -1153,7 +1155,7 @@ extension Unsafe${Mutable}RawBufferPointer: CustomDebugStringConvertible {
}

extension ${Self} {
@available(*, unavailable,
@available(*, unavailable,
message: "use 'Unsafe${Mutable}RawBufferPointer(rebasing:)' to convert a slice into a zero-based raw buffer.")
public subscript(bounds: Range<Int>) -> ${Self} {
get { return ${Self}(start: nil, count: 0) }
Expand All @@ -1163,7 +1165,7 @@ extension ${Self} {
}

% if mutable:
@available(*, unavailable,
@available(*, unavailable,
message: "use 'UnsafeRawBufferPointer(rebasing:)' to convert a slice into a zero-based raw buffer.")
public subscript(bounds: Range<Int>) -> UnsafeRawBufferPointer {
get { return UnsafeRawBufferPointer(start: nil, count: 0) }
Expand Down
Loading