[PATCH] D57716: [CUDA][HIP] Check calling convention based on function target
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 22 08:41:01 PST 2019
yaxunl marked an inline comment as done.
yaxunl added inline comments.
================
Comment at: test/SemaCUDA/amdgpu-windows-vectorcall.cu:9-10
+
+template<class _Ret, class _Arg0, class _Types> struct A<_Ret (__cdecl _Arg0::*)(_Types) > { };
+template<class _Ret, class _Arg0, class _Types> struct A<_Ret (__vectorcall _Arg0::*)(_Types) > {};
+
----------------
tra wrote:
> I don't think we need templates here. We're only making sure that the function attributes are handled correctly.
> Can we get by with a regular function declaration or definition?
>
>
Here we want to make sure `_Ret (__cdecl _Arg0::*)(_Types)` and `_Ret (__vectorcall _Arg0::*)(_Types)` are different types because calling convention is part of type, otherwise it results in compilation error due to duplicate template instantation. I can come up with a test without template.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57716/new/
https://reviews.llvm.org/D57716
More information about the cfe-commits
mailing list