[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 04:26:40 PDT 2025
================
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType,
RequiredArgs::All);
}
+const CGFunctionInfo &
+CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType,
+ const FunctionArgList &args) {
+ auto argTypes = getArgTypesForDeclaration(Context, args);
----------------
AaronBallman wrote:
IMO, the coding standard says to spell out the type here. However, I think you should spell out of the type not because a rule told you to but because a reviewer asked for it (that alone should suffice). But as a matter of practicality: should that be `const auto &` instead? Does the type have a move constructor? These sort of questions come up for reviewers and we shouldn't have to chase down types we can't see.
FWIW, another option is to get rid of `argTypes` entirely and nest the function call instead. The local variable isn't really giving much value to begin with.
> I don't consider it in scope for this PR.
This is new code, it's in scope for this PR to adjust the way you express it.
https://github.com/llvm/llvm-project/pull/133030
More information about the cfe-commits
mailing list