Skip to content

Commit 8afc830

Browse files
stevelorddremiolriggs
authored andcommitted
Fix namespace
1 parent 911a8d6 commit 8afc830

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cpp/src/gandiva/engine.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,13 @@ Status Engine::Make(const std::shared_ptr<Configuration>& conf, bool cached,
180180
// original Module.
181181
auto module_ptr = module.get();
182182

183-
auto opt_level =
184-
conf->optimize() ? llvm::CodeGenOpt::Aggressive : llvm::CodeGenOpt::None;
183+
#if LLVM_VERSION_MAJOR >= 18
184+
using CodeGenOptLevel = llvm::CodeGenOptLevel;
185+
#else
186+
using CodeGenOptLevel = llvm::CodeGenOpt::Level;
187+
#endif
188+
auto const opt_level =
189+
conf->optimize() ? CodeGenOptLevel::Aggressive : CodeGenOptLevel::None;
185190

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

0 commit comments

Comments
 (0)