From 23d1a861c4f1694a3ce6b7cf51c910025b3de9b7 Mon Sep 17 00:00:00 2001 From: Yaxun Liu Date: Wed, 30 Jan 2019 12:26:54 +0000 Subject: [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352620 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCUDA/amdgpu-size_t.cu | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/SemaCUDA/amdgpu-size_t.cu (limited to 'test/SemaCUDA/amdgpu-size_t.cu') diff --git a/test/SemaCUDA/amdgpu-size_t.cu b/test/SemaCUDA/amdgpu-size_t.cu new file mode 100644 index 0000000000..66999782aa --- /dev/null +++ b/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; + -- cgit v1.2.3