Beispiel #1
0
 public LlvmModule(LLVMModuleRef reference) : base(reference)
 {
     this.functions       = new Dictionary <string, LlvmFunction>();
     this.structs         = new Dictionary <string, LlvmType>();
     this.globals         = new Dictionary <string, LlvmValue>();
     this.ExecutionEngine = this.CreateExecutionEngine();
 }
Beispiel #2
0
        public LlvmExecutionEngine CreateExecutionEngine()
        {
            // Create the reference buffer.
            LLVMExecutionEngineRef reference;

            // TODO: Handle out error.
            LLVM.CreateExecutionEngineForModule(out reference, this.reference, out _);

            // Create the execution engine wrapper.
            LlvmExecutionEngine executionEngine = new LlvmExecutionEngine(reference);

            // Return the wrapper.
            return(executionEngine);
        }