[clang] [clang] Fix inconsistencies with the device_kernel attr on different targets (PR #161905)
Nick Sarnie via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 6 07:22:31 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;
+
+ llvm::Function *F = dyn_cast<llvm::Function>(GV);
+ if (!F)
+ return;
----------------
sarnex wrote:
I just copied this from the AMD one, will remove
https://github.com/llvm/llvm-project/pull/161905
More information about the cfe-commits
mailing list