xref: /llvm-project/clang/test/CodeGen/availability-check-driverkit.c (revision 2f04e703bff3d9858f53225fa7c780b240c3e247)
1*2f04e703SEgor Zhdan // RUN: %clang_cc1 -triple x86_64-apple-driverkit19.0 -emit-llvm -o - %s | FileCheck %s
2*2f04e703SEgor Zhdan 
use_at_available()3*2f04e703SEgor Zhdan void use_at_available() {
4*2f04e703SEgor Zhdan   // CHECK: call i32 @__isPlatformVersionAtLeast(i32 10, i32 19, i32 1, i32 0)
5*2f04e703SEgor Zhdan   // CHECK-NEXT: icmp ne
6*2f04e703SEgor Zhdan   if (__builtin_available(driverkit 19.1, *))
7*2f04e703SEgor Zhdan     ;
8*2f04e703SEgor Zhdan }
9*2f04e703SEgor Zhdan 
10*2f04e703SEgor Zhdan // CHECK: declare i32 @__isPlatformVersionAtLeast(i32, i32, i32, i32)
11