Files
swift-mirror/test/DebugInfo/mandatory-inlining-ownership.swift
Michael Gottesman 46432404f3 [ownership] Remove dead option: enable-ownership-stripping-after-serialization.
We always lower ownership now after the diagnostic passes (what this option
actually controlled). So remove it.

NFC.
2020-06-16 10:52:02 -07:00

21 lines
532 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: begin_borrow {{.*}} : $OSLog, loc {{.*}}, scope 5
// CHECK: tuple (), loc {{.*}}, scope 5
// CHECK: end_borrow %9 : $OSLog, loc {{.*}}, scope 5
import os
func bar() {
if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) {
foo(OSLog.default)
}
}
@_transparent
func foo(_ logObject: OSLog) { }