llvm-project/clang/test/CodeGen/availability-check-driverkit.c
Egor Zhdan 2f04e703bf [Clang] Add DriverKit support
This is the second patch that upstreams the support for Apple's DriverKit.

The first patch: https://reviews.llvm.org/D118046.

Differential Revision: https://reviews.llvm.org/D121911
2022-05-13 20:34:57 +01:00

11 lines
344 B
C

// RUN: %clang_cc1 -triple x86_64-apple-driverkit19.0 -emit-llvm -o - %s | FileCheck %s
void use_at_available() {
// CHECK: call i32 @__isPlatformVersionAtLeast(i32 10, i32 19, i32 1, i32 0)
// CHECK-NEXT: icmp ne
if (__builtin_available(driverkit 19.1, *))
;
}
// CHECK: declare i32 @__isPlatformVersionAtLeast(i32, i32, i32, i32)