public static Function AddFunction(this Module module, Type returnType, string name, Type[] parameterTypes, Action <Function, IRBuilder> action) { var type = FunctionType.Create(returnType, parameterTypes); var func = module.AddFunction(name, type); var block = func.AppendBasicBlock(string.Empty); var builder = IRBuilder.Create(module.Context); builder.PositionBuilderAtEnd(block); action(func, builder); return(func); }
Type IHandle <Type> .ToWrapperType() => Type.Create(this);