mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This commit focuses the basics: setting up the relevant stanzas in lit.cfg and adding platform conditionals for importing Glibc. Future commits will deal with other portability fixes.
19 lines
565 B
Swift
19 lines
565 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
|
|
import Darwin
|
|
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) || os(WASI)
|
|
import Glibc
|
|
#elseif os(Windows)
|
|
import MSVCRT
|
|
#else
|
|
#error("Unsupported platform")
|
|
#endif
|
|
|
|
_ = M_PI // expected-warning {{is deprecated}}
|
|
_ = M_PI_2 // expected-warning {{is deprecated}}
|
|
_ = M_PI_4 // expected-warning {{is deprecated}}
|
|
|
|
_ = M_SQRT2 // expected-warning {{is deprecated}}
|
|
_ = M_SQRT1_2 // expected-warning {{is deprecated}}
|