mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Array literals only need to be finalized, if the array is really allocated. In case of zero elements, no allocation is done, but the empty-array singleton is used. "Finalization" means to emit an end_cow_mutation instruction on the array. As the empty-array singleton is a read-only and shared object, it's not legal to do a end_cow_mutation on it.
2.5 KiB
2.5 KiB