mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Seperate LocalSymbol from functions
This commit is contained in:
15
pythonbpf/local_symbol.py
Normal file
15
pythonbpf/local_symbol.py
Normal file
@ -0,0 +1,15 @@
|
||||
from llvm import ir
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
|
||||
@dataclass
|
||||
class LocalSymbol:
|
||||
var: ir.AllocaInstr
|
||||
ir_type: ir.Type
|
||||
metadata: Any = None
|
||||
|
||||
def __iter__(self):
|
||||
yield self.var
|
||||
yield self.ir_type
|
||||
yield self.metadata
|
||||
Reference in New Issue
Block a user