Skip to content

[TBDGen][Test] Check implied Obj-C symbol generation based on a stable swift version #72138

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
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
14 changes: 8 additions & 6 deletions test/TBD/multimodule-implied-objc.swift
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
// REQUIRES: VENDOR=apple
// XFAIL: OS=ios && (CPU=arm64e || CPU=arm64)
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/cache)
// RUN: split-file %s %t

/// Create Swift modules to import.
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: -module-name IndirectMixedDependency -I %t \
// RUN: -enable-library-evolution -swift-version 5 \
// RUN: -enable-library-evolution \
// RUN: -target %target-swift-abi-5.8-triple \
// RUN: -emit-module %t/IndirectMixedDependency.swift \
// RUN: -emit-module-path %t/IndirectMixedDependency.swiftmodule
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
// RUN: -enable-library-evolution -swift-version 5 \
// RUN: -enable-library-evolution \
// RUN: -target %target-swift-abi-5.8-triple \
// RUN: -emit-module %t/SwiftDependency.swift \
// RUN: -module-name SwiftDependency -I %t\
// RUN: -emit-module-path %t/SwiftDependency.swiftmodule

// Generate TBD file.
// RUN: %target-swift-frontend -I %t -module-cache-path %t/cache \
// RUN: %t/Client.swift -emit-ir -o/dev/null -parse-as-library \
// RUN: -target %target-swift-abi-5.8-triple \
// RUN: -module-name client -validate-tbd-against-ir=missing \
// RUN: -tbd-install_name client -emit-tbd -emit-tbd-path %t/client.tbd

// RUN: %validate-json %t/client.tbd | %FileCheck %s

// CHECK: "_OBJC_METACLASS_$__TtCO6client11extendedAPI6Square"
// CHECK-NOT: "objc_class"
// CHECK-NOT: _OBJC_C
// CHECK-NOT: "CLASS_$__TtCO6client11extendedAPI6Square"
// CHECK: "objc_class"
// CHECK: "_TtCO6client11extendedAPI6Square"

//--- module.modulemap
module IndirectMixedDependency {
Expand Down