This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new c61df29e7b GH-49428: [C++][Gandiva] Add support for LLVM 22.1.0 
(#49429)
c61df29e7b is described below

commit c61df29e7b16c901587f6a092a792cb7ea8f59b1
Author: Raúl Cumplido <[email protected]>
AuthorDate: Wed Mar 4 02:49:25 2026 +0100

    GH-49428: [C++][Gandiva] Add support for LLVM 22.1.0 (#49429)
    
    ### Rationale for this change
    
    Some of our CI jobs fail because conda jobs are pulling LLVM 22.1.0 and we 
are not compatible.
    
    ### What changes are included in this PR?
    
    Add 22.1.0 as compatible LLVM and minor fix to update the location of 
PassPlugin.h due to:
    - https://github.com/llvm/llvm-project/pull/173279
    
    ### Are these changes tested?
    
    Yes via CI
    
    ### Are there any user-facing changes?
    
    No, the only change is that LLVM 22.1.0 will be supported.
    
    * GitHub Issue: #49428
    
    Lead-authored-by: Raúl Cumplido <[email protected]>
    Co-authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/CMakeLists.txt        | 1 +
 cpp/src/gandiva/engine.cc | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 5629261973..44186494ec 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -177,6 +177,7 @@ set(ARROW_DOC_DIR "share/doc/${PROJECT_NAME}")
 set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support")
 
 set(ARROW_LLVM_VERSIONS
+    "22.1"
     "21.1"
     "20.1"
     "19.1"
diff --git a/cpp/src/gandiva/engine.cc b/cpp/src/gandiva/engine.cc
index cc10eb352d..901421c86c 100644
--- a/cpp/src/gandiva/engine.cc
+++ b/cpp/src/gandiva/engine.cc
@@ -72,7 +72,11 @@
 #if LLVM_VERSION_MAJOR >= 14
 #  include <llvm/IR/PassManager.h>
 #  include <llvm/MC/TargetRegistry.h>
-#  include <llvm/Passes/PassPlugin.h>
+#  if LLVM_VERSION_MAJOR >= 22
+#    include <llvm/Plugins/PassPlugin.h>
+#  else
+#    include <llvm/Passes/PassPlugin.h>
+#  endif
 #  include <llvm/Transforms/IPO/GlobalOpt.h>
 #  include <llvm/Transforms/Scalar/NewGVN.h>
 #  include <llvm/Transforms/Scalar/SimplifyCFG.h>

Reply via email to