Files
swift-mirror/test/IRGen/asan-attributes.swift
Kuba (Brecka) Mracek a1aced9e71 Undo "Disable ASan in coroutine functions; it interferes with splitting." (3a4185c). (#23951)
This is no longer needed because we now make sure to run the coroutine lowering pass before ASan/TSan instrumentation passes.
2019-04-11 15:16:51 -07:00

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: }