Skip to content

Commit 13a5cc8

Browse files
Copilotekyooo
andcommitted
Fix LLVM deprecation warnings for PointerType::getUnqual
Co-authored-by: ekyooo <46103109+ekyooo@users.noreply.github.com>
1 parent 8d4d543 commit 13a5cc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cc/bpf_module_rw_engine.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ string BPFModule::make_reader(Module *mod, Type *type) {
286286

287287
string name = "reader" + std::to_string(readers_.size());
288288
#if LLVM_VERSION_MAJOR >= 18
289-
vector<Type *> fn_args({B.getPtrTy(), PointerType::getUnqual(type)});
289+
vector<Type *> fn_args({B.getPtrTy(), PointerType::getUnqual(type->getContext())});
290290
#else
291291
vector<Type *> fn_args({B.getInt8PtrTy(), PointerType::getUnqual(type)});
292292
#endif
@@ -354,7 +354,7 @@ string BPFModule::make_writer(Module *mod, Type *type) {
354354

355355
string name = "writer" + std::to_string(writers_.size());
356356
#if LLVM_VERSION_MAJOR >= 18
357-
vector<Type *> fn_args({B.getPtrTy(), B.getInt64Ty(), PointerType::getUnqual(type)});
357+
vector<Type *> fn_args({B.getPtrTy(), B.getInt64Ty(), PointerType::getUnqual(type->getContext())});
358358
#else
359359
vector<Type *> fn_args({B.getInt8PtrTy(), B.getInt64Ty(), PointerType::getUnqual(type)});
360360
#endif

0 commit comments

Comments
 (0)