mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Symbol graph files are processed per platform--documentation for symbols that are unconditionally unavailable or obsoleted on a platform shouldn't be shown for that same platform. Also, removes `isUnconditionallyUnavailable` from the JSON format. If it's unconditionally unavailable, it won't show up at all. rdar://60193675
38 lines
933 B
Swift
38 lines
933 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-build-swift %s -module-name Unavailable -emit-module -emit-module-path %t/
|
|
// RUN: %target-swift-symbolgraph-extract -module-name Unavailable -I %t -pretty-print -output-dir %t
|
|
// RUN: %FileCheck %s --input-file %t/Unavailable.symbols.json
|
|
|
|
// REQUIRES: OS=macosx
|
|
|
|
public struct ShouldAppear {}
|
|
|
|
// CHECK-NOT: OSXUnavailable
|
|
@available(OSX, unavailable)
|
|
public struct OSXUnavailable {}
|
|
|
|
@available(OSX, unavailable)
|
|
extension ShouldAppear {
|
|
public func shouldntAppear1() {}
|
|
}
|
|
|
|
// CHECK-NOT: OSXObsoleted
|
|
@available(OSX, obsoleted: 10.9)
|
|
public struct OSXObsoleted {}
|
|
|
|
@available(OSX, obsoleted: 10.9)
|
|
extension ShouldAppear {
|
|
public func shouldntAppear2() {}
|
|
}
|
|
|
|
// CHECK-NOT: SwiftObsoleted
|
|
@available(swift, obsoleted: 1.0)
|
|
public struct SwiftObsoleted {}
|
|
|
|
@available(swift, obsoleted: 1.0)
|
|
extension ShouldAppear {
|
|
public func shouldntAppear3() {}
|
|
}
|
|
|
|
// CHECK-NOT: shouldntAppear
|