format chore

This commit is contained in:
2025-10-09 10:06:17 +05:30
parent d86dd683f4
commit 22289821f9
18 changed files with 134 additions and 128 deletions

View File

@ -5,6 +5,7 @@ import llvmlite.ir as ir
class DwarfBehaviorEnum: class DwarfBehaviorEnum:
"""DWARF module flag behavior constants for LLVM.""" """DWARF module flag behavior constants for LLVM."""
ERROR_IF_MISMATCH = ir.Constant(ir.IntType(32), 1) ERROR_IF_MISMATCH = ir.Constant(ir.IntType(32), 1)
WARNING_IF_MISMATCH = ir.Constant(ir.IntType(32), 2) WARNING_IF_MISMATCH = ir.Constant(ir.IntType(32), 2)
OVERRIDE_USE_LARGEST = ir.Constant(ir.IntType(32), 7) OVERRIDE_USE_LARGEST = ir.Constant(ir.IntType(32), 7)

View File

@ -40,6 +40,7 @@ def section(name: str):
Returns: Returns:
A decorator function that marks the function with the section name A decorator function that marks the function with the section name
""" """
def wrapper(fn): def wrapper(fn):
"""Decorator that sets the section name on the function.""" """Decorator that sets the section name on the function."""
fn._section = name fn._section = name

View File

@ -33,6 +33,7 @@ class LocalSymbol:
ir_type: LLVM IR type of the variable ir_type: LLVM IR type of the variable
metadata: Optional metadata (e.g., struct type name) metadata: Optional metadata (e.g., struct type name)
""" """
var: ir.AllocaInstr var: ir.AllocaInstr
ir_type: ir.Type ir_type: ir.Type
metadata: Any = None metadata: Any = None

View File

@ -25,6 +25,7 @@ logger: Logger = logging.getLogger(__name__)
class BPFHelperID(Enum): class BPFHelperID(Enum):
"""Enumeration of BPF helper function IDs.""" """Enumeration of BPF helper function IDs."""
BPF_MAP_LOOKUP_ELEM = 1 BPF_MAP_LOOKUP_ELEM = 1
BPF_MAP_UPDATE_ELEM = 2 BPF_MAP_UPDATE_ELEM = 2
BPF_MAP_DELETE_ELEM = 3 BPF_MAP_DELETE_ELEM = 3

View File

@ -6,6 +6,7 @@ These are used for type checking and map definition; the actual BPF maps
are generated as LLVM IR during compilation. are generated as LLVM IR during compilation.
""" """
# This file provides type and function hints only and does not actually give any functionality. # This file provides type and function hints only and does not actually give any functionality.
class HashMap: class HashMap:
""" """

View File

@ -44,6 +44,7 @@ def is_map(func_node):
class BPFMapType(Enum): class BPFMapType(Enum):
"""Enumeration of BPF map types.""" """Enumeration of BPF map types."""
UNSPEC = 0 UNSPEC = 0
HASH = 1 HASH = 1
ARRAY = 2 ARRAY = 2