summaryrefslogtreecommitdiff
path: root/dev-util/bcc/files/bcc-0.36.1-getUnqual.patch
blob: 52b2fc04d2f157397b86584fdf911b7bffefb4c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
https://github.com/iovisor/bcc/issues/5472

--- bcc/src/cc/bpf_module_rw_engine.cc
+++ bcc/src/cc/bpf_module_rw_engine.cc
@@ -286,7 +286,7 @@ string BPFModule::make_reader(Module *mo
 
   string name = "reader" + std::to_string(readers_.size());
 #if LLVM_VERSION_MAJOR >= 18
-  vector<Type *> fn_args({B.getPtrTy(), PointerType::getUnqual(type)});
+  vector<Type *> fn_args({B.getPtrTy(), PointerType::getUnqual(type->getContext())});
 #else
   vector<Type *> fn_args({B.getInt8PtrTy(), PointerType::getUnqual(type)});
 #endif
@@ -354,7 +354,7 @@ string BPFModule::make_writer(Module *mo
 
   string name = "writer" + std::to_string(writers_.size());
 #if LLVM_VERSION_MAJOR >= 18
-  vector<Type *> fn_args({B.getPtrTy(), B.getInt64Ty(), PointerType::getUnqual(type)});
+  vector<Type *> fn_args({B.getPtrTy(), B.getInt64Ty(), PointerType::getUnqual(type->getContext())});
 #else
   vector<Type *> fn_args({B.getInt8PtrTy(), B.getInt64Ty(), PointerType::getUnqual(type)});
 #endif