Skip to content

Commit

Permalink
Fix error from JIT revert.
Browse files Browse the repository at this point in the history
  • Loading branch information
lriggs committed Dec 27, 2024
1 parent df16619 commit 765811b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cpp/src/gandiva/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ Status Engine::Make(const std::shared_ptr<Configuration>& conf, bool cached,
// original Module.
auto module_ptr = module.get();

auto opt_level =
conf->optimize() ? llvm::CodeGenOpt::Aggressive : llvm::CodeGenOpt::None;
#if LLVM_VERSION_MAJOR >= 18
using CodeGenOptLevel = llvm::CodeGenOptLevel;
#else
using CodeGenOptLevel = llvm::CodeGenOpt::Level;
#endif
auto const opt_level =
conf->optimize() ? CodeGenOptLevel::Aggressive : CodeGenOptLevel::None;

// Note that the lifetime of the error string is not captured by the
// ExecutionEngine but only for the lifetime of the builder. Found by
Expand Down

0 comments on commit 765811b

Please sign in to comment.