mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add _get_base_type to expr_pass
This commit is contained in:
@ -129,6 +129,14 @@ def _handle_ctypes_call(
|
|||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
|
def _get_base_type(ir_type):
|
||||||
|
"""Get the base type for pointer types."""
|
||||||
|
cur_type = ir_type
|
||||||
|
while isinstance(cur_type, ir.PointerType):
|
||||||
|
cur_type = cur_type.pointee
|
||||||
|
return cur_type
|
||||||
|
|
||||||
|
|
||||||
def _normalize_types(builder, lhs, rhs):
|
def _normalize_types(builder, lhs, rhs):
|
||||||
"""Normalize types for comparison."""
|
"""Normalize types for comparison."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user