diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-09-07 07:08:02 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-09-07 07:08:02 +0000 |
commit | f333de37528567ce384554bc333386e4a474af0b (patch) | |
tree | 2ee9e2afda5c4fa7e96039bc76a56f9de10e643c /clang/test/Preprocessor | |
parent | 8afb5cd89446d5bc011bf8737ce1ae80fa9db858 (diff) | |
download | bcm5719-llvm-f333de37528567ce384554bc333386e4a474af0b.tar.gz bcm5719-llvm-f333de37528567ce384554bc333386e4a474af0b.zip |
OpenCL: Defining __ENDIAN_LITTLE__ and fix target endianness
OpenCL requires __ENDIAN_LITTLE__ be set for little endian targets.
The default for targets was also apparently big endian, so AMDGPU
was incorrectly reported as big endian. Set this from the triple
so targets don't have another place to set the endianness.
llvm-svn: 280787
Diffstat (limited to 'clang/test/Preprocessor')
-rw-r--r-- | clang/test/Preprocessor/init.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 88fc9bd2db4..5a0b268d847 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -6653,6 +6653,7 @@ // RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=amdgcn < /dev/null | FileCheck -match-full-lines -check-prefix AMDGCN --check-prefix AMDGPU %s // RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=r600 -target-cpu caicos < /dev/null | FileCheck -match-full-lines --check-prefix AMDGPU %s // +// AMDGPU:#define __ENDIAN_LITTLE__ 1 // AMDGPU:#define cl_khr_byte_addressable_store 1 // AMDGCN:#define cl_khr_fp64 1 // AMDGPU:#define cl_khr_global_int32_base_atomics 1 |