// RUN: %clang_cc1 -E -dM -triple arm64-apple-macosx15.0.0 -target-cpu apple-m1 %s | FileCheck %s -check-prefix CHECK-MACOSX

// CHECK-MACOSX: #define __APPLE_CC__
// CHECK-MACOSX: #define __APPLE__
// CHECK-MACOSX: #define __ARM_64BIT_STATE 1
// CHECK-MACOSX-NOT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
// CHECK-MACOSX-NOT: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-MACOSX: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 150000
// CHECK-MACOSX: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 150000
// CHECK-MACOSX-NOT: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
// CHECK-MACOSX-NOT: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
// CHECK-MACOSX: #define __MACH__
// CHECK-MACOSX: #define __STDC_NO_THREADS__

// RUN: %clang_cc1 -E -dM -triple arm64-apple-ios18.0.0 -target-cpu apple-a7 %s | FileCheck %s -check-prefix CHECK-IOS

// CHECK-IOS: #define __APPLE_CC__
// CHECK-IOS: #define __APPLE__
// CHECK-IOS: #define __ARM_64BIT_STATE 1
// CHECK-IOS-NOT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
// CHECK-IOS: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ 180000
// CHECK-IOS-NOT: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
// CHECK-IOS: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 180000
// CHECK-IOS-NOT: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
// CHECK-IOS-NOT: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
// CHECK-IOS: #define __MACH__
// CHECK-IOS: #define __STDC_NO_THREADS__

// RUN: %clang_cc1 -E -dM -triple arm64-apple-watchos11.0.0 -target-cpu apple-s4 %s | FileCheck %s -check-prefix CHECK-WATCHOS

// CHECK-WATCHOS: #define __APPLE_CC__
// CHECK-WATCHOS: #define __APPLE__
// CHECK-WATCHOS: #define __ARM_64BIT_STATE 1
// CHECK-WATCHOS-NOT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
// CHECK-WATCHOS-NOT: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-WATCHOS-NOT: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
// CHECK-WATCHOS: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 110000
// CHECK-WATCHOS-NOT: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
// CHECK-WATCHOS: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ 110000
// CHECK-WATCHOS: #define __MACH__
// CHECK-WATCHOS: #define __STDC_NO_THREADS__

// RUN: %clang_cc1 -E -dM -triple arm64-apple-tvos18.0.0 -target-cpu apple-a7 %s | FileCheck %s -check-prefix CHECK-TVOS

// CHECK-TVOS: #define __APPLE_CC__
// CHECK-TVOS: #define __APPLE__
// CHECK-TVOS: #define __ARM_64BIT_STATE 1
// CHECK-TVOS-NOT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
// CHECK-TVOS-NOT: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-TVOS-NOT: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
// CHECK-TVOS: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 180000
// CHECK-TVOS: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ 180000
// CHECK-TVOS-NOT: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
// CHECK-TVOS: #define __MACH__
// CHECK-TVOS: #define __STDC_NO_THREADS__

// RUN: %clang_cc1 -E -dM -triple arm64-apple-driverkit24.0.0 -target-cpu apple-a7 %s | FileCheck %s -check-prefix CHECK-DRIVERKIT

// CHECK-DRIVERKIT: #define __APPLE_CC__
// CHECK-DRIVERKIT: #define __APPLE__
// CHECK-DRIVERKIT: #define __ARM_64BIT_STATE 1
// CHECK-DRIVERKIT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ 240000
// CHECK-DRIVERKIT-NOT: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-DRIVERKIT-NOT: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
// CHECK-DRIVERKIT: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 240000
// CHECK-DRIVERKIT-NOT: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
// CHECK-DRIVERKIT-NOT: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
// CHECK-DRIVERKIT: #define __MACH__
// CHECK-DRIVERKIT: #define __STDC_NO_THREADS__

// RUN: %clang_cc1 -E -dM -triple arm64-apple-xros2.0.0 -target-cpu apple-a12 %s | FileCheck %s -check-prefix CHECK-XROS

// CHECK-XROS: #define __APPLE_CC__
// CHECK-XROS: #define __APPLE__
// CHECK-XROS: #define __ARM_64BIT_STATE 1
// CHECK-XROS-NOT: #define __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__
// CHECK-XROS-NOT: #define __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-XROS-NOT: #define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
// CHECK-XROS: #define __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 20000
// CHECK-XROS-NOT: #define __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__
// CHECK-XROS-NOT: #define __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__
// CHECK-XROS: #define __MACH__
// CHECK-XROS: #define __STDC_NO_THREADS__
