Files
swift-mirror/test/IRGen/asan-attributes.swift
3405691582 7b431b4ddb [test] Mark XFAIL tests for OpenBSD.
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.
2020-06-10 18:57:19 -04:00

24 lines
592 B
Swift

// REQUIRES: asan_runtime
// This test verifies that we add the function attributes used by ASan.
// RUN: %target-swift-frontend -emit-ir -sanitize=address %s | %FileCheck %s -check-prefix=ASAN
// ASAN: define {{.*}} @"$s4main4testyyF"() [[DEFAULT_ATTRS:#[0-9]+]]
public func test() {
}
// ASAN: define {{.*}} @"$s4main1xSivr"({{.*}}) [[COROUTINE_ATTRS:#[0-9]+]]
public var x: Int {
_read {
yield 0
}
}
// ASAN: attributes [[DEFAULT_ATTRS]] =
// ASAN-SAME: sanitize_address
// ASAN-SAME: }
// ASAN: attributes [[COROUTINE_ATTRS]] =
// ASAN-SAME: sanitize_address
// ASAN-SAME: }