================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to