[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 26 09:04:07 PDT 2025
================
@@ -18,22 +18,118 @@
using namespace clang;
using namespace clang::CIRGen;
-CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType) {
- void *buffer = operator new(totalSizeToAlloc<ArgInfo>(1));
+CIRGenFunctionInfo *
+CIRGenFunctionInfo::create(CanQualType resultType,
+ llvm::ArrayRef<CanQualType> argTypes) {
+ void *buffer = operator new(totalSizeToAlloc<ArgInfo>(argTypes.size() + 1));
CIRGenFunctionInfo *fi = new (buffer) CIRGenFunctionInfo();
+ fi->numArgs = argTypes.size();
fi->getArgsBuffer()[0].type = resultType;
+ for (unsigned i = 0; i < argTypes.size(); ++i)
+ fi->getArgsBuffer()[i + 1].type = argTypes[i];
----------------
Lancern wrote:
Updated.
https://github.com/llvm/llvm-project/pull/136810
More information about the cfe-commits
mailing list