[clang] [CUDA][HIP] Fix record layout on Windows (PR #87651)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 10 07:57:43 PDT 2024


yxsamliu wrote:

> In general, having different C++ ABIs between the host and device seems like an ongoing source of tension and bugs.

I agree. However completely switching to Microsoft ABI on device side does not work with existing device libraries since they assume Itanium mangling. Therefore I only changes record layout to be compatible with host, in the hope that the generated LLVM IR is correct for such a combination.

I added more tests about member accessing and virtual function calls. It seems the IR is correct. I think clang codegen is generic enough to handle Itanium ABI with Microsoft record layout.



https://github.com/llvm/llvm-project/pull/87651


More information about the cfe-commits mailing list