[clang] [clang] Fix inconsistencies with the device_kernel attr on different targets (PR #161905)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 3 14:51:33 PDT 2025
================
@@ -240,6 +242,26 @@ void CommonSPIRTargetCodeGenInfo::setOCLKernelStubCallingConvention(
FT, FT->getExtInfo().withCallingConv(CC_SpirFunction));
}
+void CommonSPIRTargetCodeGenInfo::setTargetAttributes(
+ const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const {
+ if (M.getLangOpts().OpenCL)
+ return;
+
+ if (GV->isDeclaration())
+ return;
----------------
jhuber6 wrote:
Can merge these.
https://github.com/llvm/llvm-project/pull/161905
More information about the cfe-commits
mailing list