Skip to content

Commit 235841d

Browse files
authored
GH-49087 [CI][Packaging][Gandiva] Add support for LLVM 15 or earlier again (#49091)
### Rationale for this change LLVM 15 or earlier uses `llvm::Optional` not `std::optional`. ### What changes are included in this PR? Use `llvm::Optional` with LLVM 15 or earlier. ### Are these changes tested? Yes, compiling. ### Are there any user-facing changes? No * GitHub Issue: #49087 Authored-by: logan.riggs@gmail.com <logan.riggs@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 384ea25 commit 235841d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cpp/src/gandiva/engine.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,11 @@ Result<std::unique_ptr<llvm::orc::LLJIT>> BuildJIT(
230230
#endif
231231

232232
jit_builder.setJITTargetMachineBuilder(std::move(jtmb));
233+
#if LLVM_VERSION_MAJOR >= 16
233234
jit_builder.setDataLayout(std::make_optional(data_layout));
235+
#else
236+
jit_builder.setDataLayout(llvm::Optional<llvm::DataLayout>(data_layout));
237+
#endif
234238

235239
if (object_cache.has_value()) {
236240
jit_builder.setCompileFunctionCreator(

0 commit comments

Comments
 (0)