File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,13 @@ func _allocateUninitializedArray<Element>(_ builtinCount: Builtin.Word)
41
41
if count > 0 {
42
42
// Doing the actual buffer allocation outside of the array.uninitialized
43
43
// semantics function enables stack propagation of the buffer.
44
- let storageType : _ContiguousArrayStorage < Element > . Type
45
44
#if !$Embedded
46
- storageType = getContiguousArrayStorageType ( for: Element . self)
45
+ let bufferObject = Builtin . allocWithTailElems_1 (
46
+ getContiguousArrayStorageType ( for: Element . self) , builtinCount, Element . self)
47
47
#else
48
- storageType = _ContiguousArrayStorage< Element> . self
49
- #endif
50
48
let bufferObject = Builtin . allocWithTailElems_1 (
51
- storageType, builtinCount, Element . self)
49
+ _ContiguousArrayStorage< Element> . self , builtinCount, Element . self)
50
+ #endif
52
51
53
52
let ( array, ptr) = Array< Element> . _adoptStorage( bufferObject, count: count)
54
53
return ( array, ptr. _rawValue)
You can’t perform that action at this time.
0 commit comments