mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IRGen] Make pointers to accessor functions in layout strings relative (#64155)
* [IRGen] Make pointers to accessor functions in layout strings relative rdar://106319336 Pointers embedded in static layout strings should always be relative, so layout strings can reside in read-only memory. * Properly handle reference storage ownership * Pass layout tag and metadata / type layout ppointers separately * Layout string instantiation fully working * Fix cases where hasLayoutString flag was not set when it should have * Update include/swift/ABI/Metadata.h
This commit is contained in:
@@ -153,12 +153,12 @@ CastsTests.test("Cast from Swift existential to Protocol") {
|
||||
/// test these paths on Linux as well.
|
||||
protocol P4 {}
|
||||
CastsTests.test("struct -> Obj-C -> Protocol") {
|
||||
struct S: P4 {
|
||||
struct SFUUUHREEEEEFFFF: P4 {
|
||||
let value: Int
|
||||
let tracker = LifetimeTracked(13)
|
||||
}
|
||||
|
||||
let a: P4 = S(value: 13)
|
||||
let a: P4 = SFUUUHREEEEEFFFF(value: 13)
|
||||
|
||||
let b = _bridgeAnythingToObjectiveC(a)
|
||||
let d = b as? Any
|
||||
|
||||
Reference in New Issue
Block a user