@@ -16,7 +16,7 @@ def bpf_ktime_get_ns_emitter(call, map_ptr, module, builder, func, local_sym_tab
1616 return result
1717
1818
19- def bpf_map_lookup_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None ):
19+ def bpf_map_lookup_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None , struct_sym_tab = None ):
2020 """
2121 Emit LLVM IR for bpf_map_lookup_elem helper function call.
2222 """
@@ -172,7 +172,7 @@ def bpf_printk_emitter(call, map_ptr, module, builder, func, local_sym_tab=None)
172172 ir .IntType (32 ), len (fmt_str ))], tail = True )
173173
174174
175- def bpf_map_update_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None ):
175+ def bpf_map_update_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None , struct_sym_tab = None ):
176176 """
177177 Emit LLVM IR for bpf_map_update_elem helper function call.
178178 Expected call signature: map.update(key, value, flags=0)
@@ -268,7 +268,7 @@ def bpf_map_update_elem_emitter(call, map_ptr, module, builder, local_sym_tab=No
268268 return result
269269
270270
271- def bpf_map_delete_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None ):
271+ def bpf_map_delete_elem_emitter (call , map_ptr , module , builder , local_sym_tab = None , struct_sym_tab = None ):
272272 """
273273 Emit LLVM IR for bpf_map_delete_elem helper function call.
274274 Expected call signature: map.delete(key)
@@ -340,7 +340,7 @@ def bpf_get_current_pid_tgid_emitter(call, map_ptr, module, builder, func, local
340340 return pid
341341
342342
343- def bpf_perf_event_output_handler (call , map_ptr , module , builder , local_sym_tab = None ):
343+ def bpf_perf_event_output_handler (call , map_ptr , module , builder , local_sym_tab = None , struct_sym_tab = None ):
344344 pass
345345
346346
@@ -355,7 +355,7 @@ def bpf_perf_event_output_handler(call, map_ptr, module, builder, local_sym_tab=
355355}
356356
357357
358- def handle_helper_call (call , module , builder , func , local_sym_tab = None , map_sym_tab = None ):
358+ def handle_helper_call (call , module , builder , func , local_sym_tab = None , map_sym_tab = None , struct_sym_tab = None ):
359359 if isinstance (call .func , ast .Name ):
360360 func_name = call .func .id
361361 if func_name in helper_func_list :
@@ -373,7 +373,7 @@ def handle_helper_call(call, module, builder, func, local_sym_tab=None, map_sym_
373373 map_ptr = map_sym_tab [map_name ]
374374 if method_name in helper_func_list :
375375 return helper_func_list [method_name ](
376- call , map_ptr , module , builder , local_sym_tab )
376+ call , map_ptr , module , builder , local_sym_tab , struct_sym_tab )
377377 else :
378378 raise NotImplementedError (
379379 f"Map method { method_name } is not implemented as a helper function." )
0 commit comments