public static uint ToUInt(this LLVMAttributeKind k) { return((uint)k); }
public static void AddFunctionParamAttribute(this LLVMValueRef self, LLVMContextRef context, int param, LLVMAttributeKind kind, uint value = 0) { var att = LLVM.CreateEnumAttribute(context, kind.ToUInt(), value); LLVM.AddAttributeAtIndex(self, (LLVMAttributeIndex)(param + 1), att); }
public static void AddCallAttribute(this LLVMValueRef self, LLVMContextRef context, int arg, LLVMAttributeKind kind, uint value = 0) { var att = LLVM.CreateEnumAttribute(context, kind.ToUInt(), value); LLVM.AddCallSiteAttribute(self, (LLVMAttributeIndex)(arg + 1), att); }
public static void AddFunctionReturnAttribute(this LLVMValueRef self, LLVMContextRef context, LLVMAttributeKind kind, uint value = 0) { var att = LLVM.CreateEnumAttribute(context, kind.ToUInt(), value); LLVM.AddAttributeAtIndex(self, LLVMAttributeIndex.LLVMAttributeReturnIndex, att); }