| 624 | } |
| 625 | |
| 626 | void Engine::AddGlobalMappingForFunc(const std::string& name, llvm::Type* ret_type, |
| 627 | const std::vector<llvm::Type*>& args, void* func) { |
| 628 | const auto prototype = llvm::FunctionType::get(ret_type, args, /*is_var_arg*/ false); |
| 629 | auto* function = llvm::Function::Create(prototype, llvm::GlobalValue::ExternalLinkage, |
| 630 | name, module()); |
| 631 | // TODO: Other native function mappings may require target-specific ABI attributes |
| 632 | // that cannot be inferred from their LLVM types alone. |
| 633 | internal::AddNativeBoolZExtAttrs(*function); |
| 634 | AddAbsoluteSymbol(*lljit_, name, func); |
| 635 | } |
| 636 | |
| 637 | arrow::Status Engine::AddGlobalMappings() { |
| 638 | ARROW_RETURN_NOT_OK(ExportedFuncsRegistry::AddMappings(this)); |
no test coverage detected