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(); }
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); }