public FunctionSignature(IABI abi, Type returnType, Type[] parameterTypes, MethodCallingConvention callingConvention, PInvokeInfo pinvoke) { ReturnType = new FunctionParameterType(abi, returnType); ParameterTypes = new FunctionParameterType[parameterTypes.Length]; for (int index = 0; index < parameterTypes.Length; index++) ParameterTypes[index] = new FunctionParameterType(abi, parameterTypes[index]); CallingConvention = callingConvention; PInvokeInfo = pinvoke; }
public FunctionSignature(IABI abi, Type returnType, Type[] parameterTypes, MethodCallingConvention callingConvention, PInvokeInfo pinvoke) { ReturnType = new FunctionParameterType(abi, returnType); ParameterTypes = new FunctionParameterType[parameterTypes.Length]; for (int index = 0; index < parameterTypes.Length; index++) { ParameterTypes[index] = new FunctionParameterType(abi, parameterTypes[index]); } CallingConvention = callingConvention; PInvokeInfo = pinvoke; }
private TypeRef GetFunctionInputParameterTypeLLVM(FunctionParameterType parameterType) { switch (parameterType.ABIParameterInfo.Kind) { case ABIParameterInfoKind.Indirect: return LLVM.PointerType(parameterType.Type.DefaultTypeLLVM, 0); case ABIParameterInfoKind.Coerced: return parameterType.ABIParameterInfo.CoerceType; case ABIParameterInfoKind.Direct: return parameterType.Type.DefaultTypeLLVM; default: throw new ArgumentOutOfRangeException(); } }