| 731 | } |
| 732 | |
| 733 | llvm::Function* LlvmCodeGen::GetFunction(const string& symbol, bool clone) { |
| 734 | llvm::Function* fn = module_->getFunction(symbol.c_str()); |
| 735 | if (fn == NULL) { |
| 736 | LOG(ERROR) << "Unable to locate function " << symbol; |
| 737 | return NULL; |
| 738 | } |
| 739 | Status status = MaterializeFunction(fn); |
| 740 | if (UNLIKELY(!status.ok())) return NULL; |
| 741 | if (clone) return CloneFunction(fn); |
| 742 | return fn; |
| 743 | } |
| 744 | |
| 745 | llvm::Function* LlvmCodeGen::GetFunction(IRFunction::Type ir_type, bool clone) { |
| 746 | llvm::Function* fn = cross_compiled_functions_[ir_type]; |