mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
IRGen: support read-only statically initialized arrays in embedded swift
Arrays buffers need to be initialized with a (minimal) metatype and with an immortal reference count.
This commit is contained in:
@@ -46,6 +46,7 @@ public struct HeapObject {
|
||||
static let refcountMask = Int(bitPattern: 0x7fff_ffff)
|
||||
#endif
|
||||
|
||||
// Note: The immortalRefCount value of -1 is also hard-coded in IRGen in `irgen::emitConstantObject`.
|
||||
static let immortalRefCount = -1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user