Skip to content

Commit 20dd289

Browse files
Fix test cases for LTO
1 parent 16e90d7 commit 20dd289

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

test/LTO/module_summary_generic_type_ref.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-sib -emit-module-summary-path %t/default_wt.swiftmodule.summary -module-name default_wt -Xllvm -module-summary-embed-debug-name %s
3-
// RUN: %swift_frontend_plain -cross-module-opt %t/default_wt.swiftmodule.summary -module-summary-embed-debug-name -o %t/default_wt.swiftmodule.merged-summary
3+
// RUN: %swift_frontend_plain -merge-module-summary %t/default_wt.swiftmodule.summary -module-summary-embed-debug-name -o %t/default_wt.swiftmodule.merged-summary
44
// RUN: %swift-module-summary-test --to-yaml %t/default_wt.swiftmodule.merged-summary -o %t/default_wt.merged-summary.yaml
55

66
// Ensure that optimizer won't eliminate PrimitiveSequenceType.getPrimitiveSequence
77
// RUN: %target-swift-frontend -c -module-summary-path %t/default_wt.swiftmodule.merged-summary default_wt.sib -o %t/default_wt.o
8-
// RUN: %target-swiftc_driver %t/default_wt.o -o %t/default_wt
9-
// RUN: %t/default_wt
8+
// RUN: %target-build-swift %t/default_wt.o -o %t/default_wt
9+
// RUN: %target-run %t/default_wt
1010

1111
// RUN: cat %t/default_wt.merged-summary.yaml | %FileCheck %s
1212
// CHECK: 8732890044670327403:

test/LTO/module_summary_preserved.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ func callableFromC2(x: Int) -> Int {
4646
return 2
4747
}
4848

49-
// RUN: cat %t/preserved.summary.yaml | %FileCheck %s -check-prefix OBJC
49+
// RUN: if [ %target-runtime == "objc" ]; then cat %t/preserved.summary.yaml | %FileCheck %s -check-prefix OBJC; fi
5050
// OBJC: 3149498140227613915:
5151
// OBJC-NEXT: name: '$s9preserved1AC11objcMethod1yyFTo'
5252
// OBJC-NEXT: guid: 3149498140227613915
5353
// OBJC-NEXT: live: false
5454
// OBJC-NEXT: preserved: true
55+
56+
#if canImport(ObjectiveC)
5557
import Foundation
5658

5759
class A: NSObject {
5860
@objc func objcMethod1() {}
5961
}
62+
#endif

test/LTO/type_refs_summary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
// VTABLE-IMPL-NEXT: type_guid: 9126595621082655001
6767

6868

69-
// RUN: %swift_frontend_plain -cross-module-opt %t/type_refs.swiftmodule.summary -module-summary-embed-debug-name -o %t/type_refs.swiftmodule.merged-summary
69+
// RUN: %swift_frontend_plain -merge-module-summary %t/type_refs.swiftmodule.summary -module-summary-embed-debug-name -o %t/type_refs.swiftmodule.merged-summary
7070
// RUN: %swift-module-summary-test --to-yaml %t/type_refs.swiftmodule.merged-summary -o %t/type_refs.merged-summary.yaml
7171
// Ensure that WT of V is not used.
7272
// RUN: cat %t/type_refs.merged-summary.yaml | %FileCheck %s -check-prefix USED-TYPE

0 commit comments

Comments
 (0)