mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
format chore
This commit is contained in:
@ -356,9 +356,7 @@ def process_func_body(
|
|||||||
builder.ret(ir.Constant(ir.IntType(64), 0))
|
builder.ret(ir.Constant(ir.IntType(64), 0))
|
||||||
|
|
||||||
|
|
||||||
def process_bpf_chunk(
|
def process_bpf_chunk(func_node, module, return_type, map_sym_tab, structs_sym_tab):
|
||||||
func_node, module, return_type, map_sym_tab, structs_sym_tab
|
|
||||||
):
|
|
||||||
"""Process a single BPF chunk (function) and emit corresponding LLVM IR."""
|
"""Process a single BPF chunk (function) and emit corresponding LLVM IR."""
|
||||||
|
|
||||||
func_name = func_node.name
|
func_name = func_node.name
|
||||||
@ -420,7 +418,7 @@ def func_proc(tree, module, chunks, map_sym_tab, structs_sym_tab):
|
|||||||
module,
|
module,
|
||||||
ctypes_to_ir(infer_return_type(func_node)),
|
ctypes_to_ir(infer_return_type(func_node)),
|
||||||
map_sym_tab,
|
map_sym_tab,
|
||||||
structs_sym_tab
|
structs_sym_tab,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class VmlinuxHandler:
|
|||||||
"""Handle access to vmlinux struct fields"""
|
"""Handle access to vmlinux struct fields"""
|
||||||
# Check if it's a variable of vmlinux struct type
|
# Check if it's a variable of vmlinux struct type
|
||||||
if struct_var_name in local_sym_tab:
|
if struct_var_name in local_sym_tab:
|
||||||
var_info = local_sym_tab[struct_var_name]
|
var_info = local_sym_tab[struct_var_name] # noqa: F841
|
||||||
# Need to check if this variable is a vmlinux struct
|
# Need to check if this variable is a vmlinux struct
|
||||||
# This will depend on how you track vmlinux struct types in your symbol table
|
# This will depend on how you track vmlinux struct types in your symbol table
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|||||||
Reference in New Issue
Block a user