Skip to content

Commit c0e329e

Browse files
committed
Use old API for old LLVM versions
1 parent 4872860 commit c0e329e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/src/gandiva/llvm_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ class GANDIVA_EXPORT LLVMTypes {
5656
llvm::Type* double_type() { return llvm::Type::getDoubleTy(context_); }
5757

5858
llvm::PointerType* ptr_type(llvm::Type* type) {
59+
#if LLVM_VERSION_MAJOR >= 21
5960
return llvm::PointerType::get(context_, 0);
61+
#else
62+
return llvm::PointerType::get(type, 0);
63+
#endif
6064
}
6165

6266
llvm::PointerType* i8_ptr_type() { return ptr_type(i8_type()); }

0 commit comments

Comments
 (0)