Skip to content

Commit

Permalink
stdlib: Make Unsafe{Mutable,}BufferPointer @_fixed_layout to work aro…
Browse files Browse the repository at this point in the history
…und rdar://18157434
  • Loading branch information
slavapestov committed Nov 2, 2016
1 parent 07ec69f commit 5ded13c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/public/core/UnsafeBufferPointer.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ public struct UnsafeBufferPointerIterator<Element>
/// underlying elements.
///
/// The pointer should be aligned to `MemoryLayout<Element>.alignment`.

// FIXME: rdar://18157434 - until this is fixed, this has to be fixed layout
// to avoid a hang in Foundation, which has the following setup:
// struct A { struct B { let x: UnsafeMutableBufferPointer<...> } let b: B }
@_fixed_layout
public struct Unsafe${Mutable}BufferPointer<Element>
: _${Mutable}Indexable, ${Mutable}Collection, RandomAccessCollection {

Expand Down

0 comments on commit 5ded13c

Please sign in to comment.