================ @@ -18,9 +18,12 @@ using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create() { - // For now we just create an empty CIRGenFunctionInfo. - CIRGenFunctionInfo *fi = new CIRGenFunctionInfo(); +CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType) { + void *buffer = operator new(totalSizeToAlloc<ArgInfo>(1)); ---------------- erichkeane wrote:
> I couldn't find any instances of ASTContext::Allocate being used in the > classic codegen. Is it safe to use it here? THAT I'm not sure of. I was hoping that pinging the codegen codeowners would bring us some clarity :) That being `delete` instead of `operator delete` (or just `new` here...) don't necessarily match. That said, I'd probably push for a range-for implementation of that, else it would sound good to me. It sounds like someone in the incubator noticed this at one point :): ``` for (CIRGenFuncInfo *FI : FunctionInfos) { delete FI; } ``` THOUGH Playing with it, I realize that there is some problem with the implementation of FoldingSetIterator that makes that not work right... perhaps someone needs to fix THAT too :D https://github.com/llvm/llvm-project/pull/135552 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits