================ @@ -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:
This is REALLY strange to be calling global-operator-new directly, and we probably don't want to. Additionally, we use allocators in the 'context' somewhere, so I suspect that MLIRContext has an allocator? THOUGH It looks from `https://mlir.llvm.org/doxygen/IR_2Operation_8cpp_source.html#l00082` that mlir might be calling `malloc`, which is curious. What is our allocation story for MLIR/CIR? 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