[llvm] RuntimeLibcalls: Add function signatures to RTLIB. (PR #226264)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 12:07:26 PDT 2026


================
@@ -462,6 +503,37 @@ RuntimeLibcallsInfo::getFunctionTy(LLVMContext &Ctx, const Triple &TT,
     return {FunctionType::get(Type::getVoidTy(Ctx), ArgTys, false), Attrs};
   }
   default:
+    // Get C-type function signature of the Libcall if provided,
+    // and convert it to IR FunctionType.
+    Libcall LC = getLibcallFromImpl(LibcallImpl);
+    const FuncArgTypeID *ProtoTypes = &SignatureTable[SignatureOffset[LC]];
+
+    if (ProtoTypes[0] != NoFuncArgType) {
+      Type *RetTy = convertToIRType(ProtoTypes[0], Ctx, TT, DL);
+      Type *LastTy = RetTy, *ArgTy;
+      SmallVector<Type *, 4> ArgTys;
+      bool IsVarArg(false);
----------------
arsenm wrote:

```suggestion
      bool IsVarArg = false;
```

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


More information about the llvm-commits mailing list