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


##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -36,11 +36,16 @@ namespace gandiva {
     AddTrace(__VA_ARGS__); \
   }
 
-LLVMGenerator::LLVMGenerator(bool cached) : cached_(cached), 
enable_ir_traces_(false) {}
+LLVMGenerator::LLVMGenerator(bool cached,
+                             std::shared_ptr<FunctionRegistry> 
function_registry)
+    : cached_(cached),
+      function_registry_(std::move(function_registry)),
+      enable_ir_traces_(false) {}
 
-Status LLVMGenerator::Make(std::shared_ptr<Configuration> config, bool cached,
+Status LLVMGenerator::Make(const std::shared_ptr<Configuration>& config, bool 
cached,
                            std::unique_ptr<LLVMGenerator>* llvm_generator) {
-  std::unique_ptr<LLVMGenerator> llvmgen_obj(new LLVMGenerator(cached));
+  std::unique_ptr<LLVMGenerator> llvmgen_obj(
+      new LLVMGenerator(cached, config->function_registry()));

Review Comment:
   This doesn't seem possible. This `new LLVMGenerator` is called in the 
function pattern method `LLVMGenerator ::Make`, and the `LLVMGenerator` 
constructor is intentionally marked as private, so the `make_unique` cannot 
call this constructor publicly.



-- 
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