Skip to content

6.0: [Test] Fix uniqueness check line for 32 bit. #73888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions test/Interpreter/builtin_bridge_object.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 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
// 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
// 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
// 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

// REQUIRES: executable_test
// REQUIRES: objc_interop
Expand Down Expand Up @@ -140,7 +140,16 @@ if true {

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

Expand Down