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

Function VerifyAndLinkModule

cpp/src/gandiva/engine.cc:263–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263arrow::Status VerifyAndLinkModule(
264 llvm::Module& dest_module,
265 llvm::Expected<std::unique_ptr<llvm::Module>> src_module_or_error) {
266 ARROW_ASSIGN_OR_RAISE(
267 auto src_ir_module,
268 AsArrowResult(src_module_or_error, "Failed to verify and link module: "));
269
270 src_ir_module->setDataLayout(dest_module.getDataLayout());
271
272 std::string error_info;
273 llvm::raw_string_ostream error_stream(error_info);
274 ARROW_RETURN_IF(
275 llvm::verifyModule(*src_ir_module, &error_stream),
276 Status::CodeGenError("verify of IR Module failed: " + error_stream.str()));
277
278 ARROW_RETURN_IF(llvm::Linker::linkModules(dest_module, std::move(src_ir_module)),
279 Status::CodeGenError("failed to link IR Modules"));
280
281 return Status::OK();
282}
283
284} // namespace
285

Callers 2

LoadPreCompiledIRMethod · 0.85

Calls 3

CodeGenErrorFunction · 0.85
strMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected