mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Find all the usages of `--enable-experimental-feature` or `--enable-upcoming-feature` in the tests and replace some of the `REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which should correctly apply to depending on the asserts/noasserts mode of the toolchain for each feature. Remove some comments that talked about enabling asserts since they don't apply anymore (but I might had miss some). All this was done with an automated script, so some formatting weirdness might happen, but I hope I fixed most of those. There might be some tests that were `REQUIRES: asserts` that might run in `noasserts` toolchains now. This will normally be because their feature went from experimental to upcoming/base and the tests were not updated.
47 lines
1.6 KiB
Swift
47 lines
1.6 KiB
Swift
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %S/section.swift -S -parse-as-library | %FileCheck %s --check-prefix=ASM --check-prefix ASM-%target-os
|
|
// REQUIRES: CPU=wasm32
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: swift_feature_SymbolLinkageMarkers
|
|
|
|
// Wasm cannot have user defined section name for code sections
|
|
//
|
|
// ASM-NOT: .section{{.*}}__TEXT,__mysection
|
|
// ASM: .section ".text.$s7section3fooyyF"
|
|
// ASM: $s7section3fooyyF:
|
|
// ASM: .section ".text.$s7section8MyStructV3fooyyF","R",@
|
|
// ASM: $s7section8MyStructV3fooyyF:
|
|
|
|
// Wasm places one-time init token on .bss section before each "__TEXT,__mysection"
|
|
// so need to put .section directives for each data to switch sections.
|
|
// Here is an example pattern of a global variable with @section
|
|
// ```
|
|
// .type $s7section2g0_Wz,@object
|
|
// .section ".bss.$s7section2g0_Wz","",@
|
|
// .p2align 2, 0x0
|
|
// $s7section2g0_Wz:
|
|
// .int32 0
|
|
// .size $s7section2g0_Wz, 4
|
|
//
|
|
// .hidden $s7section2g0Sivp
|
|
// .type $s7section2g0Sivp,@object
|
|
// .section "__TEXT,__mysection","",@
|
|
// .globl $s7section2g0Sivp
|
|
// .p2align 2, 0x0
|
|
// $s7section2g0Sivp:
|
|
// .int32 1
|
|
// .size $s7section2g0Sivp, 4
|
|
// ```
|
|
|
|
// ASM: .section "__DATA,__mysection"
|
|
// ASM: $s7section2g0Sivp:
|
|
// ASM-NOT: .section
|
|
// ASM: $s7section2g1Si_Sitvp:
|
|
// ASM-NOT: .section
|
|
// ASM: $s7section2g2Sbvp:
|
|
// ASM-NOT: .section
|
|
// ASM: $s7section2g3Sbvp:
|
|
// ASM-NOT: .section
|
|
// ASM: $s7section2g4SpySiGSgvp:
|
|
// ASM-NOT: .section
|
|
// ASM: $s7section2g5SpySiGSgvp:
|