Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }