mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-11 15:40:56 +00:00
format chore
This commit is contained in:
@ -5,6 +5,7 @@ import llvmlite.ir as ir
|
||||
|
||||
class DwarfBehaviorEnum:
|
||||
"""DWARF module flag behavior constants for LLVM."""
|
||||
|
||||
ERROR_IF_MISMATCH = ir.Constant(ir.IntType(32), 1)
|
||||
WARNING_IF_MISMATCH = ir.Constant(ir.IntType(32), 2)
|
||||
OVERRIDE_USE_LARGEST = ir.Constant(ir.IntType(32), 7)
|
||||
|
||||
@ -40,6 +40,7 @@ def section(name: str):
|
||||
Returns:
|
||||
A decorator function that marks the function with the section name
|
||||
"""
|
||||
|
||||
def wrapper(fn):
|
||||
"""Decorator that sets the section name on the function."""
|
||||
fn._section = name
|
||||
|
||||
@ -33,6 +33,7 @@ class LocalSymbol:
|
||||
ir_type: LLVM IR type of the variable
|
||||
metadata: Optional metadata (e.g., struct type name)
|
||||
"""
|
||||
|
||||
var: ir.AllocaInstr
|
||||
ir_type: ir.Type
|
||||
metadata: Any = None
|
||||
|
||||
@ -25,6 +25,7 @@ logger: Logger = logging.getLogger(__name__)
|
||||
|
||||
class BPFHelperID(Enum):
|
||||
"""Enumeration of BPF helper function IDs."""
|
||||
|
||||
BPF_MAP_LOOKUP_ELEM = 1
|
||||
BPF_MAP_UPDATE_ELEM = 2
|
||||
BPF_MAP_DELETE_ELEM = 3
|
||||
|
||||
@ -6,6 +6,7 @@ These are used for type checking and map definition; the actual BPF maps
|
||||
are generated as LLVM IR during compilation.
|
||||
"""
|
||||
|
||||
|
||||
# This file provides type and function hints only and does not actually give any functionality.
|
||||
class HashMap:
|
||||
"""
|
||||
|
||||
@ -44,6 +44,7 @@ def is_map(func_node):
|
||||
|
||||
class BPFMapType(Enum):
|
||||
"""Enumeration of BPF map types."""
|
||||
|
||||
UNSPEC = 0
|
||||
HASH = 1
|
||||
ARRAY = 2
|
||||
|
||||
Reference in New Issue
Block a user