Files
swift-mirror/test/DebugInfo/mandatory-inlining-ownership.swift
Artem Chikin 1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00

25 lines
770 B
Swift

// REQUIRES: objc_interop
// RUN: %target-swift-frontend -emit-sil %s -Onone -Xllvm \
// RUN: -sil-print-after=mandatory-inlining \
// RUN: -Xllvm -sil-print-debuginfo -o /dev/null 2>&1 | %FileCheck %s
// CHECK: sil_scope [[S0:[0-9]+]] { {{.*}} parent @$s4null3baryyF
// CHECK: sil_scope [[S1:[0-9]+]] { loc "{{.*}}":18:3 parent [[S0]] }
// CHECK: sil_scope [[S2:[0-9]+]] { loc "{{.*}}":18:82 parent [[S1]] }
// CHECK: begin_borrow {{.*}} : $OSLog, loc {{.*}}, scope [[S2]]
// CHECK: tuple (), loc {{.*}}, scope [[S2]]
// CHECK: end_borrow %9 : $OSLog, loc {{.*}}, scope [[S2]]
import os
func bar() {
if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, visionOS 9999, *) {
foo(OSLog.default)
}
}
@_transparent
func foo(_ logObject: OSLog) { }