AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.
Summary:
Summary:
Change Clang calling convention SpirKernel to OpenCLKernel.
Set calling convention OpenCLKernel for amdgcn as well.
Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo
and use it to set target calling convention for AMDGPU and SPIR.
Update tests.
Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl
Subscribers: kzhuravl, cfe-commits
Differential Revision: http://reviews.llvm.org/D21367
llvm-svn: 274220
diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp
index 8d49c6f..902a0ed 100644
--- a/clang/lib/AST/ItaniumMangle.cpp
+++ b/clang/lib/AST/ItaniumMangle.cpp
@@ -2161,7 +2161,7 @@
case CC_AAPCS_VFP:
case CC_IntelOclBicc:
case CC_SpirFunction:
- case CC_SpirKernel:
+ case CC_OpenCLKernel:
case CC_PreserveMost:
case CC_PreserveAll:
// FIXME: we should be mangling all of the above.