[llvm] RuntimeLibcalls: Add function signatures to RTLIB. (PR #226264)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 11:46:05 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);
----------------
sujianIBM wrote:
I got the lowering from TargetLibraryInfo ([link](https://github.com/llvm/llvm-project/blob/6120eb5267a8643dd399f8858b6c92f23a846551/llvm/lib/Analysis/TargetLibraryInfo.cpp#L1008)), which is not consistent with clang lowering.
I have changed it to clang's way and added an attribute return value. I am not sure whether it should be an AttributeSet. I am using Attribute for now.
https://github.com/llvm/llvm-project/pull/226264
More information about the llvm-commits
mailing list