|
38 | 38 | // RUN: test -f %t/modulecache/OtherModule-*.swiftmodule
|
39 | 39 | // RUN: test -f %t/TestModule.d
|
40 | 40 | // RUN: llvm-bcanalyzer -dump %t/modulecache/OtherModule-*.swiftmodule | %FileCheck %s -check-prefix=CHECK-OTHERMODULE
|
41 |
| -// RUN: %FileCheck %s -check-prefix=CHECK-DEPENDS <%t/TestModule.d |
42 | 41 | // CHECK-OTHERMODULE: {{MODULE_NAME.*blob data = 'OtherModule'}}
|
43 | 42 | // CHECK-OTHERMODULE: {{FILE_DEPENDENCY.*Swift.swiftmodule'}}
|
44 | 43 | // CHECK-OTHERMODULE: {{FILE_DEPENDENCY.*SwiftOnoneSupport.swiftmodule'}}
|
45 | 44 | // CHECK-OTHERMODULE: {{FILE_DEPENDENCY.*LeafModule.swiftinterface'}}
|
46 | 45 | // CHECK-OTHERMODULE: {{FILE_DEPENDENCY.*LeafModule-.*.swiftmodule'}}
|
47 | 46 | // CHECK-OTHERMODULE: {{FILE_DEPENDENCY.*OtherModule.swiftinterface'}}
|
48 | 47 | // CHECK-OTHERMODULE: FUNC_DECL
|
| 48 | +// |
| 49 | +// Quirk: because the cached .swiftmodules have a hash name component that |
| 50 | +// integrates target, and we sort the contents of lines in a .d file by the |
| 51 | +// dependency's reverse-name (for reasons), the order in which the cached |
| 52 | +// .swiftmodules are listed in the .d file will vary _by target_. |
| 53 | +// |
| 54 | +// So we cannot write a single set of CHECK-SAME lines here that will work |
| 55 | +// for all targets: some will have LeafModule first, some OtherModule |
| 56 | +// first. So instead, we write two sets of patterns, and run FileCheck |
| 57 | +// twice. Yes this is silly. |
| 58 | +// |
| 59 | +// RUN: %FileCheck %s -check-prefix=CHECK-DEPENDS <%t/TestModule.d |
| 60 | +// RUN: %FileCheck %s -check-prefix=CHECK-DEPENDSAGAIN <%t/TestModule.d |
| 61 | +// |
49 | 62 | // CHECK-DEPENDS: TestModule.swiftmodule :
|
50 | 63 | // CHECK-DEPENDS-SAME: LeafModule.swiftinterface
|
51 | 64 | // CHECK-DEPENDS-SAME: OtherModule.swiftinterface
|
52 |
| -// CHECK-DEPENDS-SAME: {{LeafModule-[^ ]+.swiftmodule}} |
53 | 65 | // CHECK-DEPENDS-SAME: {{OtherModule-[^ ]+.swiftmodule}}
|
54 | 66 | // CHECK-DEPENDS-SAME: Swift.swiftmodule
|
55 | 67 | // CHECK-DEPENDS-SAME: SwiftOnoneSupport.swiftmodule
|
| 68 | +// |
| 69 | +// CHECK-DEPENDSAGAIN: TestModule.swiftmodule : |
| 70 | +// CHECK-DEPENDSAGAIN-SAME: {{LeafModule-[^ ]+.swiftmodule}} |
56 | 71 |
|
57 | 72 | import OtherModule
|
58 | 73 |
|
|
0 commit comments