Skip to content

Commit 338d499

Browse files
committed
Fix count_temps_in_call to only look for Pointer args of a helper_sig
1 parent 3078d42 commit 338d499

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pythonbpf/functions/functions_pass.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def count_temps_in_call(call_node, local_sym_tab):
6262
):
6363
continue
6464
param_type = HelperHandlerRegistry.get_param_type(func_name, arg_idx)
65-
count[param_type] = count.get(param_type, 0) + 1
65+
if isinstance(param_type, ir.PointerType):
66+
pointee_type = param_type.pointee
67+
count[pointee_type] = count.get(pointee_type, 0) + 1
6668

6769
return count
6870

0 commit comments

Comments
 (0)