mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Intialize single case enum extrainhabitant value witness in generated code
Older Swift runtimes miss this initialization in the swift_initEnumMetadataSingleCase runtime call. rdar://49786768
This commit is contained in:
@@ -228,6 +228,13 @@ IRGenModule::IRGenModule(IRGenerator &irgen,
|
||||
SizeTy // extra inhabitant flags (optional)
|
||||
});
|
||||
|
||||
TypeLayoutTy = createStructType(*this, "swift.type_layout", {
|
||||
SizeTy, // size
|
||||
SizeTy, // stride
|
||||
Int32Ty, // flags
|
||||
Int32Ty // extra inhabitant count
|
||||
});
|
||||
|
||||
// A protocol descriptor describes a protocol. It is not type metadata in
|
||||
// and of itself, but is referenced in the structure of existential type
|
||||
// metadata records.
|
||||
|
||||
Reference in New Issue
Block a user