[clang] [clang] teach OpenCL to set the param addrspace before calling CG EmitParmDecl (PR #184264)
Jameson Nash via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 5 13:55:49 PST 2026
================
@@ -4306,13 +4306,15 @@ void CodeGenFunction::EmitCfiCheckStub() {
QualType QInt64Ty = C.getIntTypeForBitwidth(64, false);
FunctionArgList FnArgs;
- ImplicitParamDecl ArgCallsiteTypeId(C, QInt64Ty, ImplicitParamKind::Other);
- ImplicitParamDecl ArgAddr(C, C.VoidPtrTy, ImplicitParamKind::Other);
- ImplicitParamDecl ArgCFICheckFailData(C, C.VoidPtrTy,
- ImplicitParamKind::Other);
- FnArgs.push_back(&ArgCallsiteTypeId);
- FnArgs.push_back(&ArgAddr);
- FnArgs.push_back(&ArgCFICheckFailData);
+ auto *ArgCallsiteTypeId =
+ ImplicitParamDecl::Create(C, QInt64Ty, ImplicitParamKind::Other);
+ auto *ArgAddr =
+ ImplicitParamDecl::Create(C, C.VoidPtrTy, ImplicitParamKind::Other);
+ auto *ArgCFICheckFailData =
+ ImplicitParamDecl::Create(C, C.VoidPtrTy, ImplicitParamKind::Other);
+ FnArgs.push_back(ArgCallsiteTypeId);
+ FnArgs.push_back(ArgAddr);
+ FnArgs.push_back(ArgCFICheckFailData);
----------------
vtjnash wrote:
Is it useful here? That's a little outside my C++ arcana. It seems like it would matter a little more if these APIs took an ArrayRef, but we need this argument twice (once to build the function type, then again to call it), but since this is a SmallVector on the stack, these seem like a lot of different ways to spell the same thing.
https://github.com/llvm/llvm-project/pull/184264
More information about the cfe-commits
mailing list