From 3feabbb5c1a55f7daffbf404b915190f2436ce25 Mon Sep 17 00:00:00 2001 From: Vasily Chekalkin Date: Sun, 6 Mar 2011 21:00:40 +1100 Subject: [PATCH] More functions! More! --- runtime/parrot/library/LLVM.pm | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/runtime/parrot/library/LLVM.pm b/runtime/parrot/library/LLVM.pm index e849abe31d..b201750d1c 100644 --- a/runtime/parrot/library/LLVM.pm +++ b/runtime/parrot/library/LLVM.pm @@ -9,6 +9,73 @@ module LLVM { LLVMModuleCreateWithName => "pt", LLVMDumpModule => "vp", + # See llvm::LLVMTypeKind::getTypeID. + LLVMGetTypeKind => "ip", + + # See llvm::LLVMType::getContext. + LLVMGetTypeContext => "pp", + + # Operations on integer types + LLVMInt1TypeInContext => "pp", + LLVMInt8TypeInContext => "pp", + LLVMInt16TypeInContext => "pp", + LLVMInt32TypeInContext => "pp", + LLVMInt64TypeInContext => "pp", + LLVMIntTypeInContext => "ppi", + + LLVMInt1Type => "p", + LLVMInt8Type => "p", + LLVMInt16Type => "p", + LLVMInt32Type => "p", + LLVMInt64Type => "p", + LLVMIntType => "pi", + LLVMGetIntTypeWidth => "ip", + + # Operations on real types + LLVMFloatTypeInContext => "pp", + LLVMDoubleTypeInContext => "pp", + LLVMX86FP80TypeInContext => "pp", + LLVMFP128TypeInContext => "pp", + LLVMPPCFP128TypeInContext => "pp", + + LLVMFloatType => "p", + LLVMDoubleType => "p", + LLVMX86FP80Type => "p", + LLVMFP128Type => "p", + LLVMPPCFP128Type => "p", + + # Operations on function types + LLVMFunctionType => "pppii", # FIXME + LLVMIsFunctionVarArg => "ip", + LLVMGetReturnType => "pp", + LLVMCountParamTypes => "pp", + LLVMGetParamTypes => "pp", + +# Operations on struct types + LLVMStructTypeInContext => "pppii", # FIXME + LLVMStructType => "ppii", # FIXME + LLVMCountStructElementTypes => "ip", + LLVMGetStructElementTypes => "vpp", # FIXME + LLVMIsPackedStruct => "ip", + +# Operations on array, pointer, and vector types + LLVMArrayType => "ppi", + LLVMPointerType => "ppi", + LLVMVectorType => "ppi", + + LLVMGetElementType => "pp", + LLVMGetArrayLength => "ip", + LLVMGetPointerAddressSpace => "ip", + LLVMGetVectorSize => "ip", + +# Operations on other types + LLVMVoidTypeInContext => "pp", + LLVMLabelTypeInContext => "pp", + LLVMOpaqueTypeInContext => "pp", + + LLVMVoidType => "p", + LLVMLabelType => "p", + LLVMOpaqueType => "p", # Operations on basic blocks LLVMBasicBlockAsValue => "pp",