[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / Frontend / darwin-version.c
blob28826014e39f19249547005151cf122edd9a2a72
1 // RUN: %clang_cc1 -triple armv6-apple-ios3.0.0 -dM -E -o %t %s
2 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '30000' | count 1
3 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
4 // RUN: %clang_cc1 -triple armv6-apple-ios2.0.0 -dM -E -o %t %s
5 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20000' | count 1
6 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
7 // RUN: %clang_cc1 -triple armv6-apple-ios2.2.0 -dM -E -o %t %s
8 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20200' | count 1
9 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
10 // RUN: %clang_cc1 -triple armv6-apple-ios2.3.1 -dM -E -o %t %s
11 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '20301' | count 1
12 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
13 // RUN: %clang_cc1 -triple armv7-apple-ios10.1.2 -dM -E -o %t %s
14 // RUN: grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t | grep '100102' | count 1
15 // RUN: %clang_cc1 -triple i386-apple-macosx10.4.0 -dM -E -o %t %s
16 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1040' | count 1
17 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
18 // RUN: not grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t
19 // RUN: not grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t
20 // RUN: %clang_cc1 -triple i386-apple-macosx10.4.10 -dM -E -o %t %s
21 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1049' | count 1
22 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
23 // RUN: %clang_cc1 -triple i386-apple-macosx10.5.0 -dM -E -o %t %s
24 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
25 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
26 // RUN: %clang_cc1 -triple i386-apple-macosx10.6.0 -dM -E -o %t %s
27 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1
28 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
29 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.10.0 -dM -E -o %t %s
30 // RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '101000' | count 1
31 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
33 // RUN: %clang_cc1 -triple arm64-apple-tvos8.3 -dM -E -o %t %s
34 // RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
35 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
36 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
37 // RUN: %clang_cc1 -triple arm64-apple-tvos10.2.3 -dM -E -o %t %s
38 // RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '100203' | count 1
40 // RUN: %clang_cc1 -triple x86_64-apple-tvos8.3 -dM -E -o %t %s
41 // RUN: grep '__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__' %t | grep '80300' | count 1
42 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
43 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
45 // RUN: %clang_cc1 -triple armv7k-apple-watchos2.1 -dM -E -o %t %s
46 // RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
47 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
48 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
50 // RUN: %clang_cc1 -triple i386-apple-watchos2.1 -dM -E -o %t %s
51 // RUN: grep '__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__' %t | grep '20100' | count 1
52 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
53 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
55 // RUN: %clang_cc1 -triple x86_64-apple-driverkit19.0 -dM -E -o %t %s
56 // RUN: grep '__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__' %t | grep '1900' | count 1
57 // RUN: not grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t
58 // RUN: not grep '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__' %t
60 // RUN: %clang_cc1 -triple arm64-apple-ios99.99.99 -dM -E %s | FileCheck --check-prefix=IOS99 %s
61 // IOS99: __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ 999999
62 // IOS99-NEXT: __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 999999
64 // RUN: %clang_cc1 -triple arm64-apple-watchos99.9 -dM -E %s | FileCheck --check-prefix=WATCHOS99 %s
65 // WATCHOS99: __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 990900
66 // WATCHOS99-NEXT: __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ 990900
68 // RUN: %clang_cc1 -triple arm64-apple-macos12.4 -dM -E %s | FileCheck --check-prefix=MACOS124 %s
69 // MACOS124: __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ 120400