[clang] [CIR] cir.call with scalar return type (PR #135552)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 17 07:38:43 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:

Thanks for that!  THOUGH, I do see that there is a `::create` method for that type.  Typically in clang THAT is supposed to be the only way we construct something like this.  I realize there are a number of arguments that we don't know yet, but can we switch this to use `::create` instead?

https://github.com/llvm/llvm-project/pull/135552


More information about the cfe-commits mailing list