================
@@ -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));
----------------
Lancern wrote:
> That being delete instead of operator delete (or just new here...) don't
> necessarily match.
`CIRGenFunctionInfo` (and also `CGFunctionInfo`) defines its own `operator
delete`, which just simply calls `::operator delete`:
https://github.com/llvm/llvm-project/blob/9ee4fdf4990f7dbdc0cfc30a8f733f676dbdcb51/clang/include/clang/CodeGen/CGFunctionInfo.h#L662
Thus the `delete` and `new` indeed match.
https://github.com/llvm/llvm-project/pull/135552
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits