mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The buffer of global arrays could already be statically initialized. The missing piece was the array itself, which is basically a reference to the array buffer. For example: ``` var a = [1, 2, 3] ``` ends up in two statically initialized globals: 1. the array buffer, which contains the elements 2. the variable `a` which is a single reference (= pointer) of the array buffer This optimization removes the need for lazy initialization of such variables. rdar://127757554
15 KiB
15 KiB