Merge pull request #85074 from kubamracek/section

SE-0492: Stabilize @_section/@_used into @section/@used
This commit is contained in:
Kuba (Brecka) Mracek
2025-10-24 12:29:48 -07:00
committed by GitHub
62 changed files with 816 additions and 401 deletions

View File

@@ -1,5 +1,5 @@
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -Xllvm -sil-print-types -emit-sil -target %target-swift-5.1-abi-triple -parse-as-library %s | %FileCheck %s --check-prefix=CHECK-SIL
// RUN: %target-build-swift -enable-experimental-feature SymbolLinkageMarkers -target %target-swift-5.1-abi-triple -Xfrontend -parse-as-library %s -o %t_binary
// RUN: %target-swift-frontend -Xllvm -sil-print-types -emit-sil -target %target-swift-5.1-abi-triple -parse-as-library %s | %FileCheck %s --check-prefix=CHECK-SIL
// RUN: %target-build-swift -target %target-swift-5.1-abi-triple -Xfrontend -parse-as-library %s -o %t_binary
// RUN: %target-codesign %t_binary
// RUN: %target-run %t_binary | %FileCheck %s --check-prefix=CHECK-EXEC
@@ -10,7 +10,6 @@
// rdar://76038845
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_SymbolLinkageMarkers
// UNSUPPORTED: back_deployment_runtime
@MainActor
@@ -29,7 +28,7 @@ public func callAsync() async {
// CHECK-SIL-NEXT: %initval = thin_to_thick_function %0 : $@convention(thin) @async () -> () to $@async @callee_guaranteed () -> ()
// CHECK-SIL-NEXT: }
@_section("__DATA,__mysection")
@section("__DATA,__mysection")
public var gfptr = callAsync
@main struct MyProgram {
@@ -44,4 +43,3 @@ public var gfptr = callAsync
// CHECK-EXEC: 42
// CHECK-EXEC-NEXT: Hello World!
// CHECK-EXEC-NEXT: 43