MCPcopy Create free account
hub / github.com/apache/arrow / AddGlobalMappingForFunc

Method AddGlobalMappingForFunc

cpp/src/gandiva/engine.cc:626–635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626void 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
637arrow::Status Engine::AddGlobalMappings() {
638 ARROW_RETURN_NOT_OK(ExportedFuncsRegistry::AddMappings(this));

Callers 7

AddMappingsMethod · 0.80
AddMappingsMethod · 0.80
AddMappingsMethod · 0.80
AddMappingsMethod · 0.80
AddMappingsMethod · 0.80
AddMappingsMethod · 0.80
AddMappingsMethod · 0.80

Calls 3

moduleFunction · 0.85
AddNativeBoolZExtAttrsFunction · 0.85
AddAbsoluteSymbolFunction · 0.85

Tested by

no test coverage detected