niyue commented on code in PR #38116:
URL: https://github.com/apache/arrow/pull/38116#discussion_r1368787674


##########
cpp/src/gandiva/engine.cc:
##########
@@ -256,23 +289,26 @@ Status Engine::LoadPreCompiledIR() {
   /// Parse the IR module.
   llvm::Expected<std::unique_ptr<llvm::Module>> module_or_error =
       llvm::getOwningLazyBitcodeModule(std::move(buffer), *context());
-  if (!module_or_error) {
-    // NOTE: llvm::handleAllErrors() fails linking with RTTI-disabled LLVM 
builds
-    // (ARROW-5148)
-    std::string str;
-    llvm::raw_string_ostream stream(str);
-    stream << module_or_error.takeError();
-    return Status::CodeGenError(stream.str());
-  }
-  std::unique_ptr<llvm::Module> ir_module = std::move(module_or_error.get());
+  // NOTE: llvm::handleAllErrors() fails linking with RTTI-disabled LLVM builds
+  // (ARROW-5148)
+  ARROW_RETURN_NOT_OK(VerifyAndLinkModule(module_, 
std::move(module_or_error)));
+  return Status::OK();
+}
 
-  // set dataLayout
-  SetDataLayout(ir_module.get());
+llvm::MemoryBufferRef AsLLVMMemoryBuffer(
+    const std::unique_ptr<arrow::Buffer>& arrow_buffer) {

Review Comment:
   Fixed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to