Exemplo n.º 1
0
        private static Alloca CreateEntryBlockAlloca(Function theFunction, string varName)
        {
            var tmpBldr = new InstructionBuilder(theFunction.EntryBlock);

            if (theFunction.EntryBlock.FirstInstruction != null)
            {
                tmpBldr.PositionBefore(theFunction.EntryBlock.FirstInstruction);
            }

            return(tmpBldr.Alloca(theFunction.Context.DoubleType)
                   .RegisterName(varName));
        }