| 1539 | } |
| 1540 | |
| 1541 | void LlvmCodeGen::DestroyModule() { |
| 1542 | // Clear all references to LLVM objects owned by the module. |
| 1543 | cross_compiled_functions_.clear(); |
| 1544 | handcrafted_functions_.clear(); |
| 1545 | registered_exprs_map_.clear(); |
| 1546 | registered_exprs_.clear(); |
| 1547 | llvm_intrinsics_.clear(); |
| 1548 | hash_fns_.clear(); |
| 1549 | fns_to_jit_compile_.clear(); |
| 1550 | execution_engine()->removeModule(module_); |
| 1551 | module_ = NULL; |
| 1552 | } |
| 1553 | |
| 1554 | void LlvmCodeGen::AddFunctionToJit(llvm::Function* fn, CodegenFnPtrBase* fn_ptr) { |
| 1555 | DCHECK(finalized_functions_.find(fn) != finalized_functions_.end()) |