mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These tests are marked XFAIL or UNSUPPORTED because either the tests: require libc annotation, require Mach-O support, don't recognize calls to swift-autolink-extract, requires porting alongside Linux, or rely on simd which is not present. Additionally, explicit REQUIRES for tsan/asan/fuzzer are added to some tests, since OpenBSD does not support these sanitizers or fuzzers, since it's nicer to mark that with REQUIRES rather than XFAIL.
27 lines
651 B
Swift
27 lines
651 B
Swift
// REQUIRES: tsan_runtime
|
|
// This test verifies that we add the function attributes used by TSan.
|
|
|
|
// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s | %FileCheck %s -check-prefix=TSAN
|
|
|
|
// TSan is only supported on 64 bit.
|
|
// REQUIRES: PTRSIZE=64
|
|
|
|
// TSAN: define {{.*}} @"$s4main4testyyF"() [[DEFAULT_ATTRS:#[0-9]+]]
|
|
public func test() {
|
|
}
|
|
|
|
// TSAN: define {{.*}} @"$s4main1xSivr"({{.*}}) [[COROUTINE_ATTRS:#[0-9]+]]
|
|
public var x: Int {
|
|
_read {
|
|
yield 0
|
|
}
|
|
}
|
|
|
|
// TSAN: attributes [[DEFAULT_ATTRS]] =
|
|
// TSAN-SAME: sanitize_thread
|
|
// TSAN-SAME: }
|
|
|
|
// TSAN: attributes [[COROUTINE_ATTRS]] =
|
|
// TSAN-SAME: sanitize_thread
|
|
// TSAN-SAME: }
|