Skip to content

Commit 8a08c37

Browse files
committed
Adjust section.swift test
1 parent 9a4fd77 commit 8a08c37

File tree

1 file changed

+26
-42
lines changed

1 file changed

+26
-42
lines changed

test/IRGen/section.swift

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-sil | %FileCheck %s --check-prefix=SIL --check-prefix=SIL-TOPLEVEL
2-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=IR --check-prefix=IR-TOPLEVEL
3-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-sil -parse-as-library | %FileCheck %s --check-prefix=SIL --check-prefix=SIL-LIBRARY
4-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR --check-prefix=IR-LIBRARY
5-
6-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -S | %FileCheck %s --check-prefix=ASM --check-prefix ASM-%target-os
7-
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -S -parse-as-library | %FileCheck %s --check-prefix=ASM --check-prefix ASM-%target-os
1+
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-sil -parse-as-library | %FileCheck %s --check-prefix=SIL
2+
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR
3+
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -S -parse-as-library | %FileCheck %s --check-prefix=ASM --check-prefix ASM-%target-os
84

95
// REQUIRES: swift_in_compiler
106

@@ -14,41 +10,29 @@
1410
@_section("__TEXT,__mysection") public var g3: Bool = true
1511
@_section("__TEXT,__mysection") func foo() {}
1612

17-
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g0: Int { get set }
18-
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g1: (Int, Int) { get set }
19-
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g2: Bool { get set }
20-
// SIL: @_section("__TEXT,__mysection") func foo()
21-
// SIL-LIBRARY: sil private [global_init_once_fn] @$s7section2g0_WZ : $@convention(c)
22-
// SIL-LIBRARY: sil hidden [global_init] @$s7section2g0Sivau : $@convention(thin)
23-
// SIL-LIBRARY: sil private [global_init_once_fn] @$s7section2g1_WZ : $@convention(c)
24-
// SIL-LIBRARY: sil hidden [global_init] @$s7section2g1Si_Sitvau : $@convention(thin)
25-
// SIL-LIBRARY: sil private [global_init_once_fn] @$s7section2g2_WZ : $@convention(c)
26-
// SIL-LIBRARY: sil hidden [global_init] @$s7section2g2Sbvau : $@convention(thin)
27-
// SIL-LIBRARY: sil private [global_init_once_fn] @$s7section2g3_WZ : $@convention(c)
28-
// SIL-LIBRARY: sil [global_init] @$s7section2g3Sbvau : $@convention(thin)
29-
// SIL: sil hidden [section "__TEXT,__mysection"] @$s7section3fooyyF : $@convention(thin)
30-
31-
// IR-LIBRARY: @"$s7section2g0_Wz" = internal global i64 0
32-
33-
// IR-LIBRARY: @"$s7section2g0Sivp" = hidden global %TSi <{ i64 1 }>, section "__TEXT,__mysection"
34-
// IR-TOPLEVEL: @"$s7section2g0Sivp" = hidden global %TSi zeroinitializer, section "__TEXT,__mysection"
35-
36-
// IR-LIBRARY: @"$s7section2g1_Wz" = internal global i64 0
37-
38-
// IR-LIBRARY: @"$s7section2g1Si_Sitvp" = hidden global <{ %TSi, %TSi }> <{ %TSi <{ i64 42 }>, %TSi <{ i64 43 }> }>, section "__TEXT,__mysection"
39-
// IR-TOPLEVEL: @"$s7section2g1Si_Sitvp" = hidden global <{ %TSi, %TSi }> zeroinitializer, section "__TEXT,__mysection"
40-
41-
// IR-LIBRARY: @"$s7section2g2_Wz" = internal global i64 0
42-
43-
// IR-LIBRARY: @"$s7section2g2Sbvp" = hidden global %TSb <{ i1 true }>, section "__TEXT,__mysection"
44-
// IR-TOPLEVEL: @"$s7section2g2Sbvp" = hidden global %TSb zeroinitializer, section "__TEXT,__mysection"
45-
46-
// IR-LIBRARY: @"$s7section2g3_Wz" = internal global i64 0
47-
48-
// IR-LIBRARY: @"$s7section2g3Sbvp" = {{.*}}global %TSb <{ i1 true }>, section "__TEXT,__mysection"
49-
// IR-TOPLEVEL: @"$s7section2g3Sbvp" = {{.*}}global %TSb zeroinitializer, section "__TEXT,__mysection"
50-
51-
// IR: define {{.*}}@"$s7section3fooyyF"(){{.*}} section "__TEXT,__mysection"
13+
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g0: Int { get set }
14+
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g1: (Int, Int) { get set }
15+
// SIL: @_section("__TEXT,__mysection") @_hasStorage @_hasInitialValue var g2: Bool { get set }
16+
// SIL: @_section("__TEXT,__mysection") func foo()
17+
// SIL: sil private [global_init_once_fn] @$s7section2g0_WZ : $@convention(c)
18+
// SIL: sil hidden [global_init] @$s7section2g0Sivau : $@convention(thin)
19+
// SIL: sil private [global_init_once_fn] @$s7section2g1_WZ : $@convention(c)
20+
// SIL: sil hidden [global_init] @$s7section2g1Si_Sitvau : $@convention(thin)
21+
// SIL: sil private [global_init_once_fn] @$s7section2g2_WZ : $@convention(c)
22+
// SIL: sil hidden [global_init] @$s7section2g2Sbvau : $@convention(thin)
23+
// SIL: sil private [global_init_once_fn] @$s7section2g3_WZ : $@convention(c)
24+
// SIL: sil [global_init] @$s7section2g3Sbvau : $@convention(thin)
25+
// SIL: sil hidden [section "__TEXT,__mysection"] @$s7section3fooyyF : $@convention(thin)
26+
27+
// IR: @"$s7section2g0_Wz" = internal global i64 0
28+
// IR: @"$s7section2g0Sivp" = hidden global %TSi <{ i64 1 }>, section "__TEXT,__mysection"
29+
// IR: @"$s7section2g1_Wz" = internal global i64 0
30+
// IR: @"$s7section2g1Si_Sitvp" = hidden global <{ %TSi, %TSi }> <{ %TSi <{ i64 42 }>, %TSi <{ i64 43 }> }>, section "__TEXT,__mysection"
31+
// IR: @"$s7section2g2_Wz" = internal global i64 0
32+
// IR: @"$s7section2g2Sbvp" = hidden global %TSb <{ i1 true }>, section "__TEXT,__mysection"
33+
// IR: @"$s7section2g3_Wz" = internal global i64 0
34+
// IR: @"$s7section2g3Sbvp" = {{.*}}global %TSb <{ i1 true }>, section "__TEXT,__mysection"
35+
// IR: define {{.*}}@"$s7section3fooyyF"(){{.*}} section "__TEXT,__mysection"
5236

5337
// ASM: .section{{.*}}__TEXT,__mysection
5438
// ASM-NOT: .section

0 commit comments

Comments
 (0)