Skip to content

Commit e33def8

Browse files
committed
Reflection: Fix inherits_NSObject test for 32-bit
Looks like class instances are still aligned on 16 byte boundaries here, probably because of SIMD.
1 parent 3950592 commit e33def8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

validation-test/Reflection/inherits_NSObject.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %target-run %target-swift-reflection-test %t/inherits_NSObject | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
44

55
// REQUIRES: objc_interop
6+
// REQUIRES: executable_test
67

78
import Foundation
89

@@ -39,7 +40,7 @@ reflect(object: inheritsNSObject)
3940
// CHECK-32: (class inherits_NSObject.InheritsNSObject)
4041

4142
// CHECK-32: Type info:
42-
// CHECK-32: (class_instance size=4 alignment=8 stride=8 num_extra_inhabitants=0)
43+
// CHECK-32: (class_instance size=4 alignment=16 stride=16 num_extra_inhabitants=0)
4344

4445
let sc = ContainsInheritsNSObject()
4546
reflect(object: sc)
@@ -60,7 +61,7 @@ reflect(object: sc)
6061
// CHECK-32: (class inherits_NSObject.ContainsInheritsNSObject)
6162

6263
// CHECK-32: Type info:
63-
// CHECK-32: (class_instance size=12 alignment=8 stride=16 num_extra_inhabitants=0
64+
// CHECK-32: (class_instance size=12 alignment=16 stride=16 num_extra_inhabitants=0
6465
// CHECK-32-NEXT: (field name=a offset=4
6566
// CHECK-32-NEXT: (reference kind=strong refcounting=unknown))
6667
// CHECK-32-NEXT: (field name=_b offset=8

0 commit comments

Comments
 (0)