File: weaklinked_import_peer_transitive.swift

package info (click to toggle)
swiftlang 6.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,532 kB
  • sloc: cpp: 9,901,743; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (21 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %empty-directory(%t)
//
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/weaklinked_import_helper.swiftmodule -parse-as-library %S/Inputs/weaklinked_import_helper.swift -enable-library-evolution
//
// RUN: echo '@_exported import weaklinked_import_helper' > %t/intermediate.swift
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/intermediate.swiftmodule -parse-as-library %t/intermediate.swift -I %t -enable-library-evolution
//
// RUN: echo '@_exported import weaklinked_import_helper_clang' > %t/intermediate_clang.swift
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/intermediate_clang.swiftmodule -parse-as-library %t/intermediate_clang.swift -I %t -enable-library-evolution -Xcc -fmodule-map-file=%S/Inputs/weaklinked_import_helper_clang.modulemap
//
// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -Xcc -fmodule-map-file=%S/Inputs/weaklinked_import_helper_clang.modulemap | %FileCheck %s

// UNSUPPORTED: OS=windows-msvc

@_weakLinked import intermediate
@_weakLinked import intermediate_clang

// CHECK-DAG: declare extern_weak swiftcc {{.+}} @"$s24weaklinked_import_helper2fnyyF"()
fn()
// CHECK-DAG: declare extern_weak void @clang_fn()
clang_fn()