[clang] [CIR] cir.call with scalar return type (PR #135552)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 17 08:00:13 PDT 2025
================
@@ -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 realize there are a number of arguments that we don't know yet, but can we switch this to use ::create instead?
>
> Sorry maybe I misunderstood but I'm a bit confused about what you're actually supposing -- Are you suggesting that we should use ASTContext's allocator instead of the `operator new` here?
Nope, sorry. This was a mix of github making it REALLY hard to see the context of this conversation, and me misremembering it. Disregard. I think we're fine now with the proper destruction of these, so I'm going to resolve this conversation.
https://github.com/llvm/llvm-project/pull/135552
More information about the cfe-commits
mailing list