From 33693c6fc49108b0f51121568c106cc70e58c6c8 Mon Sep 17 00:00:00 2001 From: tbkka Date: Tue, 16 Jun 2020 14:59:18 -0700 Subject: [PATCH 1/2] Disable flaky test (#32417) --- test/Driver/loaded_module_trace_swiftinterface.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Driver/loaded_module_trace_swiftinterface.swift b/test/Driver/loaded_module_trace_swiftinterface.swift index a92a34e974d0c..9cf0984a6cf9e 100644 --- a/test/Driver/loaded_module_trace_swiftinterface.swift +++ b/test/Driver/loaded_module_trace_swiftinterface.swift @@ -1,4 +1,5 @@ // UNSUPPORTED: -windows-msvc +// REQUIRES: rdar64315441 // 1) If there is no swiftmodule, use the swiftinterface // From 38fc849a1fc8ea703de2fd1f280b43c682b70257 Mon Sep 17 00:00:00 2001 From: Augusto Noronha Date: Tue, 16 Jun 2020 18:59:41 -0300 Subject: [PATCH 2/2] Document Class Metadata offsets and fields when there is no Objective-C interoperability (#32374) --- docs/ABI/TypeMetadata.rst | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/ABI/TypeMetadata.rst b/docs/ABI/TypeMetadata.rst index a74ad24ec5899..533b387e51594 100644 --- a/docs/ABI/TypeMetadata.rst +++ b/docs/ABI/TypeMetadata.rst @@ -222,13 +222,18 @@ classes. record is stored at **offset 0**, in place of an integer kind discriminator. - The **super pointer** pointing to the metadata record for the superclass is stored at **offset 1**. If the class is a root class, it is null. -- Two words are reserved for use by the Objective-C runtime at **offset 2** - and **offset 3**. -- The **rodata pointer** is stored at **offset 4**; it points to an Objective-C - compatible rodata record for the class. This pointer value includes a tag. +- On platforms which support Objective-C interoperability, two words are + reserved for use by the Objective-C runtime at **offset 2** and **offset + 3**; on other platforms, nothing is reserved. +- On platforms which support Objective-C interoperability, the **rodata + pointer** is stored at **offset 4**; on other platforms, it is not present. + The rodata pointer points to an Objective-C compatible rodata record for the + class. This pointer value includes a tag. The **low bit is always set to 1** for Swift classes and always set to 0 for Objective-C classes. -- The **class flags** are a 32-bit field at **offset 5**. +- The **class flags** are a 32-bit field at **offset 5** on platforms which + support Objective-C interoperability; on other platforms, the field is at + **offset 2**. - The **instance address point** is a 32-bit field following the class flags. A pointer to an instance of this class points this number of bytes after the beginning of the instance. @@ -246,8 +251,11 @@ classes. object size. This is the number of bytes of storage in the class metadata object. - The `nominal type descriptor`_ for the most-derived class type is referenced - at an offset immediately following the class object address point. This is - **offset 8** on a 64-bit platform or **offset 11** on a 32-bit platform. + at an offset immediately following the class object address point. On 64-bit + and 32-bit platforms which support Objective-C interoperability, this is, + respectively, at **offset 8** and at **offset 11**; in platforms that do not + support Objective-C interoperability, this is, respectively, at **offset 5** + and at **offset 8**. - For each Swift class in the class's inheritance hierarchy, in order starting from the root class and working down to the most derived class, the following fields are present: