Skip to content

Fix test. #38680

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
Merged
Show file tree
Hide file tree
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
31 changes: 22 additions & 9 deletions test/IRGen/autolink-runtime-compatibility-arm64-macos.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
// REQUIRES: rdar81115750
// REQUIRES: CPU=arm64,OS=macosx

// Doesn't autolink compatibility library because target OS doesn't need it
// RUN: %target-swift-frontend -target arm64-apple-macosx10.14 -emit-ir -parse-stdlib %s | %FileCheck -check-prefix=NO-FORCE-LOAD %s
// Only autolink compatibility libraries before 5.5 since target OS doesn't need
// it.

// RUN: %target-swift-frontend -target arm64-apple-macosx10.14 -emit-ir -parse-stdlib %s | %FileCheck %s

public func foo() {}

// NO-FORCE-LOAD-NOT: FORCE_LOAD
// NO-FORCE-LOAD-NOT: !{!"-lswiftCompatibility50"}
// NO-FORCE-LOAD-NOT: !{!"-lswiftCompatibility51"}
// NO-FORCE-LOAD-NOT: !{!"-lswiftCompatibility52"}
// NO-FORCE-LOAD-NOT: !{!"-lswiftCompatibility53"}
// NO-FORCE-LOAD-NOT: !{!"-lswiftCompatibilityDynamicReplacements"}
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility50"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility51"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility52"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility53"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements"
// CHECK-DAG: declare {{.*}} @"_swift_FORCE_LOAD_$_swiftCompatibilityConcurrency"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility50"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility51"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility52"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibility53"
// CHECK-NOT: @"_swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements"

// CHECK-NOT: !{!"-lswiftCompatibility50"}
// CHECK-NOT: !{!"-lswiftCompatibility51"}
// CHECK-NOT: !{!"-lswiftCompatibility52"}
// CHECK-NOT: !{!"-lswiftCompatibility53"}
// CHECK-NOT: !{!"-lswiftCompatibilityDynamicReplacements"}
// CHECK-DAG: !{!"-lswiftCompatibilityConcurrency"}
2 changes: 1 addition & 1 deletion test/IRGen/autolink-runtime-compatibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// Doesn't autolink compatibility library because target OS doesn't need it
// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.24 -emit-ir -parse-stdlib %s | %FileCheck -check-prefix=NO-FORCE-LOAD %s

// Only autolinks 5.1 compatibility library because target OS has 5.1
// Only autolinks 5.1 and concurrency compatibility library because target OS has 5.1 and 5.5.
// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15 -emit-ir -parse-stdlib %s | %FileCheck -check-prefix=FORCE-LOAD-51 %s

// Autolinks because compatibility library was explicitly asked for
Expand Down