public LPFunction(LPModule module, string name, LPType return_type, List <LPArgument> args)
 {
     blocks           = new List <LPBasicBlock>();
     arguments        = args;
     this.name        = name;
     this.return_type = return_type;
     this.module      = module;
 }
Example #2
0
        public LPFunction CreateFunction(string name, LPType return_type, List <LPArgument> args)
        {
            if (funcs.Any(x => x.Name == name))
            {
                return(funcs.Where(x => x.Name == name).ElementAt(0));
            }
            var func = new LPFunction(this, name, return_type, args);

            funcs.Add(func);
            return(func);
        }
Example #3
0
 public static LPConstant Create(LPType type, object content = null)
 => new LPConstant
 {
     Type = type, Content = content
 };
Example #4
0
 public static LPAllocOperator Create(LPType type)
 => new LPAllocOperator
 {
     Type = type
 };