Index: clang/lib/CodeGen/TargetInfo.cpp =================================================================== --- clang/lib/CodeGen/TargetInfo.cpp +++ clang/lib/CodeGen/TargetInfo.cpp @@ -6328,6 +6328,12 @@ B.addStackAlignmentAttr(8); Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); } + + unsigned getOpenCLKernelCallingConv() const override { + // OpenCL kernels use calling convention from the regular functions + // as there is no special support for threads. + return llvm::CallingConv::C; + } }; class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo {