Skip to content

Commit f8cc074

Browse files
Merge pull request #73888 from nate-chandler/cherrypick/release/6.0/rdar125628293
6.0: [Test] Fix uniqueness check line for 32 bit.
2 parents 7e434bc + b24ecea commit f8cc074

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/Interpreter/builtin_bridge_object.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
2-
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s
1+
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG,CHECK-%target-ptrsize
2+
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-OPT,CHECK-%target-ptrsize
33

44
// REQUIRES: executable_test
55
// REQUIRES: objc_interop
@@ -140,7 +140,16 @@ if true {
140140

141141
var bo3 = nonNativeBridgeObject(NSNumber(value: 22))
142142
print(Bool(_builtinBooleanLiteral: Builtin.isUnique(&bo3)))
143-
// CHECK-NEXT: false
143+
// On 64-bit*, this will be an objc tagged pointer. On 32-bit, there are no
144+
// objc tagged pointers. If it's an objc tagged pointer, it will never be
145+
// unique. Otherwise, it will be unique--subject to any intering of NSNumbers
146+
// that Foundation does.
147+
// * Whether it's a tagged pointer doesn't actually depend on bit width--see
148+
// OBJC_TAGGED_POINTER_BITS for the various architectures at the top of the
149+
// file. If those other architectures ever start being used in CI, this
150+
// test will need more involved updating.
151+
// CHECK-32-NEXT: true
152+
// CHECK-64-NEXT: false
144153
_fixLifetime(bo3)
145154
}
146155

0 commit comments

Comments
 (0)