[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:27 PDT 2026


================
@@ -154,6 +155,46 @@ static IntegerType *getSizeTType(LLVMContext &Ctx, const DataLayout &DL) {
   return DL.getIndexType(Ctx, /*AddressSpace=*/0);
 }
 
+static Type *convertToIRType(FuncArgTypeID ID, LLVMContext &Ctx,
+                             const Triple &TT, const DataLayout &DL) {
+
+  unsigned IntBits = TT.isArch16Bit() ? 16 : 32;
+
+  switch (ID) {
+  case Void:
+    return Type::getVoidTy(Ctx);
+  case Bool:
+    return IntegerType::get(Ctx, 8);
----------------
arsenm wrote:

I think this isn't an accurate lowering. IIRC clang will emit a bool function argument as i1 zeroext. 

(This function ought to return a pair of the Type and ABI attributes) 

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


More information about the llvm-commits mailing list