mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is no longer needed because we now make sure to run the coroutine lowering pass before ASan/TSan instrumentation passes.
23 lines
566 B
Swift
23 lines
566 B
Swift
// 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: }
|