diff options
| author | Yaxun Liu <Yaxun.Liu@amd.com> | 2019-01-30 12:26:54 +0000 |
|---|---|---|
| committer | Yaxun Liu <Yaxun.Liu@amd.com> | 2019-01-30 12:26:54 +0000 |
| commit | 95f2ca541f2840ae78a1d5723e53505adb2b0197 (patch) | |
| tree | 30e6c487550c02266305d835e87767d3f93b720b /clang/test/SemaCUDA/amdgpu-size_t.cu | |
| parent | 34eeeec3ae343d6999d6556c2d1e6f73813e3163 (diff) | |
| download | bcm5719-llvm-95f2ca541f2840ae78a1d5723e53505adb2b0197.tar.gz bcm5719-llvm-95f2ca541f2840ae78a1d5723e53505adb2b0197.zip | |
[HIP] Fix size_t for MSVC environment
In 64 bit MSVC environment size_t is defined as unsigned long long.
In single source language like HIP, data layout should be consistent
in device and host compilation, therefore copy data layout controlling
fields from Aux target for AMDGPU target.
Differential Revision: https://reviews.llvm.org/D56318
llvm-svn: 352620
Diffstat (limited to 'clang/test/SemaCUDA/amdgpu-size_t.cu')
| -rw-r--r-- | clang/test/SemaCUDA/amdgpu-size_t.cu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCUDA/amdgpu-size_t.cu b/clang/test/SemaCUDA/amdgpu-size_t.cu new file mode 100644 index 00000000000..66999782aa3 --- /dev/null +++ b/clang/test/SemaCUDA/amdgpu-size_t.cu @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -aux-triple x86_64-pc-windows-msvc -fms-compatibility -fcuda-is-device -fsyntax-only -verify %s + +// expected-no-diagnostics +typedef unsigned __int64 size_t; +typedef __int64 intptr_t; +typedef unsigned __int64 uintptr_t; + |

