|
1 |
| - |
2 | 1 | /// Test various import attributes with module aliasing.
|
3 | 2 | ///
|
4 | 3 | /// Module 'Lib' imports module 'XLogging' via module aliasing and with various import attributes.
|
|
24 | 23 | // RUN: test -f %t/Lib2.swiftmodule
|
25 | 24 | // RUN: llvm-bcanalyzer -dump %t/Lib2.swiftmodule > %t/Lib2.dump.txt
|
26 | 25 | // RUN: %FileCheck -check-prefix=CHECK-REAL-NAME %s < %t/Lib2.dump.txt
|
| 26 | +// CHECK-REAL-NAME-NOT: XLogging |
27 | 27 | // CHECK-REAL-NAME: AppleLogging
|
28 |
| -// RUN: not %FileCheck -check-prefix=CHECK-ALIAS %s < %t/Lib2.dump.txt |
29 |
| -// CHECK-ALIAS: XLogging |
30 | 28 |
|
31 | 29 | /// Test @_implementationOnly: Should fail
|
32 | 30 | // RUN: not %target-swift-frontend -module-name Lib3 %t/FileLib3.swift -module-alias XLogging=AppleLogging -I %t -emit-module -emit-module-path %t/Lib3.swiftmodule 2> %t/result-Lib3.output
|
|
43 | 41 | // RUN: %target-swift-frontend -module-name Lib4 %t/FileLib4.swift -module-alias XLogging=AppleLoggingEnablePrivate -I %t -emit-module -emit-module-path %t/Lib4.swiftmodule
|
44 | 42 | // RUN: llvm-bcanalyzer -dump %t/Lib4.swiftmodule > %t/Lib4.dump.txt
|
45 | 43 | // RUN: %FileCheck -check-prefix=CHECK-REAL-NAME4 %s < %t/Lib4.dump.txt
|
| 44 | +// CHECK-REAL-NAME4-NOT: XLogging |
46 | 45 | // CHECK-REAL-NAME4: AppleLoggingEnablePrivate
|
47 |
| -// RUN: not %FileCheck -check-prefix=CHECK-ALIAS4 %s < %t/Lib4.dump.txt |
48 |
| -// CHECK-ALIAS4: XLogging |
49 | 46 |
|
50 | 47 | /// Test @testable: Should pass
|
51 | 48 |
|
|
56 | 53 | // RUN: %target-swift-frontend -module-name Lib5 %t/FileLib5.swift -module-alias XLogging=AppleLoggingEnableTesting -I %t -emit-module -emit-module-path %t/Lib5.swiftmodule
|
57 | 54 | // RUN: llvm-bcanalyzer -dump %t/Lib5.swiftmodule > %t/Lib5.dump.txt
|
58 | 55 | // RUN: %FileCheck -check-prefix=CHECK-REAL-NAME5 %s < %t/Lib5.dump.txt
|
| 56 | +// CHECK-REAL-NAME5-NOT: XLogging |
59 | 57 | // CHECK-REAL-NAME5: AppleLoggingEnableTesting
|
60 |
| -// RUN: not %FileCheck -check-prefix=CHECK-ALIAS5 %s < %t/Lib5.dump.txt |
61 |
| -// CHECK-ALIAS5: XLogging |
62 | 58 |
|
63 | 59 | /// Test import struct: Should pass with correct module name reference
|
64 | 60 | // RUN: %target-swift-frontend -module-name Lib6 %t/FileLib6.swift -module-alias XLogging=AppleLogging -I %t -emit-module -emit-module-path %t/Lib6.swiftmodule -c -o %t/Lib6.o
|
65 | 61 | // RUN: llvm-nm --defined-only %t/Lib6.o > %t/Lib6.dump.txt
|
66 | 62 | // RUN: %FileCheck -check-prefix=CHECK-REAL-NAME6 %s < %t/Lib6.dump.txt
|
| 63 | +// CHECK-REAL-NAME6-NOT: XLogging |
67 | 64 | // CHECK-REAL-NAME6: s4Lib65start12AppleLogging6LoggerVyF
|
68 |
| -// RUN: not %FileCheck -check-prefix=CHECK-ALIAS6 %s < %t/Lib6.dump.txt |
69 |
| -// CHECK-ALIAS6: XLogging |
70 | 65 |
|
71 | 66 | /// Test canImport
|
72 | 67 | // RUN: %target-swift-frontend -module-name Lib7 %t/FileLib7.swift -module-alias XLogging=AppleLogging -I %t -emit-module -emit-module-path %t/Lib7.swiftmodule -Rmodule-loading 2> %t/Lib7.dump.txt
|
73 | 68 |
|
74 | 69 | // RUN: %FileCheck -check-prefix=CHECK-LOAD %s < %t/Lib7.dump.txt
|
| 70 | +// CHECK-LOAD-NOT: XLogging.swiftmodule |
75 | 71 | // CHECK-LOAD: AppleLogging.swiftmodule
|
76 |
| -// RUN: not %FileCheck -check-prefix=CHECK-NOT-LOAD %s < %t/Lib7.dump.txt |
77 |
| -// CHECK-NOT-LOAD: XLogging.swiftmodule |
78 | 72 |
|
79 | 73 | /// Test @_exported: Should pass with correct module name reference
|
80 | 74 | // RUN: %target-swift-frontend -module-name Lib %t/FileLib.swift -module-alias XLogging=AppleLogging -I %t -emit-module -emit-module-path %t/Lib.swiftmodule
|
|
84 | 78 |
|
85 | 79 | // RUN: llvm-nm --defined-only %t/User.o > %t/User.dump.txt
|
86 | 80 | // RUN: %FileCheck -check-prefix=CHECK-REAL-NAME-USER %s < %t/User.dump.txt
|
| 81 | +// CHECK-REAL-NAME-USER-NOT: XLogging |
87 | 82 | // CHECK-REAL-NAME-USER: s4User04MainA0V3use12AppleLogging6LoggerVyF
|
88 |
| -// RUN: not %FileCheck -check-prefix=CHECK-ALIAS-USER %s < %t/User.dump.txt |
89 |
| -// CHECK-ALIAS-USER: XLogging |
90 | 83 |
|
91 | 84 | // BEGIN FileLogging.swift
|
92 | 85 | public struct Logger {
|
|
0 commit comments