[clang] [CIR] Upstream initial function call support (PR #134673)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 8 08:17:37 PDT 2025
================
@@ -281,3 +281,33 @@ bool CIRGenTypes::isZeroInitializable(clang::QualType t) {
return true;
}
+
+const CIRGenFunctionInfo &CIRGenTypes::arrangeCIRFunctionInfo() {
+ // Lookup or create unique function info.
+ llvm::FoldingSetNodeID id;
+ CIRGenFunctionInfo::Profile(id);
+
+ void *insertPos = nullptr;
+ CIRGenFunctionInfo *fi = functionInfos.FindNodeOrInsertPos(id, insertPos);
+ if (fi)
+ return *fi;
+
+ assert(!cir::MissingFeatures::opCallCallConv());
+
+ // Construction the function info. We co-allocate the ArgInfos.
+ fi = CIRGenFunctionInfo::create();
+ functionInfos.InsertNode(fi, insertPos);
+
+ bool inserted = functionsBeingProcessed.insert(fi).second;
+ (void)inserted;
+ assert(inserted && "Recursively being processed?");
----------------
Lancern wrote:
Updated.
https://github.com/llvm/llvm-project/pull/134673
More information about the cfe-commits
mailing list