Copilot commented on code in PR #51266:
URL: https://github.com/apache/arrow/pull/51266#discussion_r3969493731


##########
cpp/src/gandiva/engine.cc:
##########
@@ -207,7 +209,12 @@ Status UseJITLinkIfEnabled(llvm::orc::LLJITBuilder& 
jit_builder) {
   static auto maybe_use_jit_link = 
::arrow::internal::GetEnvVar("GANDIVA_USE_JIT_LINK");
   if (maybe_use_jit_link.ok()) {
     ARROW_ASSIGN_OR_RAISE(static auto memory_manager, CreateMemmoryManager());
-#  if LLVM_VERSION_MAJOR >= 21
+#  if LLVM_VERSION_MAJOR >= 23
+    jit_builder.setObjectLinkingLayerCreator(
+        [](llvm::orc::ExecutionSession& ES, 
llvm::jitlink::JITLinkMemoryManager&) {

Review Comment:
   For LLVM >= 23 this lambda uses `memory_manager` but has an empty capture 
list, which will not compile (local variables must be captured even if they are 
`static`). Capture `memory_manager` explicitly (or use `[&]` as in the LLVM >= 
21 branch).



##########
cpp/src/arrow/compute/kernels/vector_hash.cc:
##########
@@ -136,7 +136,7 @@ class ValueCountsAction final : ActionBase {
   }
 
   template <class Index>
-  void ObserveNullNotFound(Index index) {
+  [[maybe_unused]] void ObserveNullNotFound(Index index) {

Review Comment:
   `index` is still unused in this overload. `[[maybe_unused]]` on the function 
won’t suppress `-Wunused-parameter`; annotate the parameter (or call 
`ARROW_UNUSED(index)`) to reliably silence unused-parameter warnings.



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