diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-28 06:00:43 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-28 06:00:43 +0000 |
commit | 2fd1377b9138ac71f8aca6e8251c655caf549406 (patch) | |
tree | 41c652f3816c5d2a93bf21610257158a90a7f517 /test/Preprocessor | |
parent | 7c2b4afc0b01cac25df584e802b91d9d351a1fee (diff) |
Basic: improve coverage for Darwin targets and fix ABI
The existing coverage for the Darwin targets wasn't enough to catch all
the variations. Improve the coverage a bit further and fix a few cases
for Darwin targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r-- | test/Preprocessor/init.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 228ae2d701..87a591923b 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -9925,3 +9925,65 @@ // RUN: | FileCheck -check-prefix=DARWIN %s // DARWIN:#define __STDC_NO_THREADS__ 1 + +// RUN: %clang_cc1 -triple i386-apple-macosx -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix MACOS-32 %s +// RUN: %clang_cc1 -triple x86_64-apple-macosx -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix MACOS-64 %s + +// MACOS-32: #define __INTPTR_TYPE__ long int +// MACOS-32: #define __PTRDIFF_TYPE__ int +// MACOS-32: #define __SIZE_TYPE__ long unsigned int + +// MACOS-64: #define __INTPTR_TYPE__ long int +// MACOS-64: #define __PTRDIFF_TYPE__ long int +// MACOS-64: #define __SIZE_TYPE__ long unsigned int + +// RUN: %clang_cc1 -triple i386-apple-ios-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-32 %s +// RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-32 %s +// RUN: %clang_cc1 -triple x86_64-apple-ios-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-64 %s +// RUN: %clang_cc1 -triple arm64-apple-ios -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix IOS-64 %s + +// IOS-32: #define __INTPTR_TYPE__ long int +// IOS-32: #define __PTRDIFF_TYPE__ int +// IOS-32: #define __SIZE_TYPE__ long unsigned int + +// IOS-64: #define __INTPTR_TYPE__ long int +// IOS-64: #define __PTRDIFF_TYPE__ long int +// IOS-64: #define __SIZE_TYPE__ long unsigned int + +// RUN: %clang_cc1 -triple i386-apple-tvos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-32 %s +// RUN: %clang_cc1 -triple armv7-apple-tvos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-32 %s +// RUN: %clang_cc1 -triple x86_64-apple-tvos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-64 %s +// RUN: %clang_cc1 -triple arm64-apple-tvos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix TVOS-64 %s + +// TVOS-32: #define __INTPTR_TYPE__ long int +// TVOS-32: #define __PTRDIFF_TYPE__ int +// TVOS-32: #define __SIZE_TYPE__ long unsigned int + +// TVOS-64: #define __INTPTR_TYPE__ long int +// TVOS-64: #define __PTRDIFF_TYPE__ long int +// TVOS-64: #define __SIZE_TYPE__ long unsigned int + +// RUN: %clang_cc1 -triple i386-apple-watchos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-32 %s +// RUN: %clang_cc1 -triple armv7k-apple-watchos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s +// RUN: %clang_cc1 -triple x86_64-apple-watchos-simulator -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s +// RUN: %clang_cc1 -triple arm64-apple-watchos -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix WATCHOS-64 %s + +// WATCHOS-32: #define __INTPTR_TYPE__ long int +// WATCHOS-32: #define __PTRDIFF_TYPE__ int +// WATCHOS-32: #define __SIZE_TYPE__ long unsigned int + +// WATCHOS-64: #define __INTPTR_TYPE__ long int +// WATCHOS-64: #define __PTRDIFF_TYPE__ long int +// WATCHOS-64: #define __SIZE_TYPE__ long unsigned int + +// RUN: %clang_cc1 -triple armv7-apple-none-macho -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix ARM-DARWIN-BAREMETAL-32 %s +// RUN: %clang_cc1 -triple arm64-apple-none-macho -ffreestanding -dM -E /dev/null -o - | FileCheck -match-full-lines -check-prefix ARM-DARWIN-BAREMETAL-64 %s + +// ARM-DARWIN-BAREMETAL-32: #define __INTPTR_TYPE__ long int +// ARM-DARWIN-BAREMETAL-32: #define __PTRDIFF_TYPE__ int +// ARM-DARWIN-BAREMETAL-32: #define __SIZE_TYPE__ long unsigned int + +// ARM-DARWIN-BAREMETAL-64: #define __INTPTR_TYPE__ long int +// ARM-DARWIN-BAREMETAL-64: #define __PTRDIFF_TYPE__ long int +// ARM-DARWIN-BAREMETAL-64: #define __SIZE_TYPE__ long unsigned int + |