Пример #1
0
 public LlvmSyntaxVisitor(Module module, Function function, IMethodSymbol methodSymbol)
 {
     _module       = module;
     _function     = function;
     _currentBlock = new InstructionBuilder(module.Context, new Block("", module.Context, function));
     _parameters   = new Value[methodSymbol.Parameters.Count];
     for (var i = 0; i < _parameters.Length; i++)
     {
         var value  = function[i];
         var alloca = _currentBlock.StackAlloc(value.Type);
         _currentBlock.Store(value, alloca);
         _parameters[i] = alloca;
     }
 }