diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2017-12-15 19:58:38 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2017-12-15 19:58:38 +0000 |
| commit | 268759e58f47f019112288de6e3a3c1aba20a071 (patch) | |
| tree | ea71f4a657501dbe9b2b696fef29726389dae2e3 /clang/test | |
| parent | 72546fe87b0d3c8c9d8035a16cf913ca84554559 (diff) | |
| download | bcm5719-llvm-268759e58f47f019112288de6e3a3c1aba20a071.tar.gz bcm5719-llvm-268759e58f47f019112288de6e3a3c1aba20a071.zip | |
__is_target_arch: Check the arch and subarch instead of the arch name
This ensures that when compiling for "arm64" __is_target_arch will succeed for
both "arm64" and "aarch64".
Thanks to Bob Wilson who pointed this out!
llvm-svn: 320853
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Preprocessor/is_target_arm64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/is_target_arm64.c b/clang/test/Preprocessor/is_target_arm64.c new file mode 100644 index 00000000000..87ebe94d18e --- /dev/null +++ b/clang/test/Preprocessor/is_target_arm64.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -triple arm64-apple-ios11 -verify %s +// expected-no-diagnostics + +#if !__is_target_arch(arm64) || !__is_target_arch(aarch64) + #error "mismatching arch" +#endif + +#if __is_target_arch(aarch64_be) + #error "mismatching arch" +#endif |

