Skip to content

Commit 61bca6b

Browse files
committed
Core: Fix global pass to divide internal functions
1 parent 305a8ba commit 61bca6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pythonbpf/globals_pass.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def populate_global_symbol_table(tree, compilation_context):
3232
return False
3333

3434

35-
def emit_global(module: ir.Module, node, name):
35+
def _emit_global(module: ir.Module, node, name):
3636
logger.info(f"global identifier {name} processing")
3737
# deduce LLVM type from the annotated return
3838
if not isinstance(node.returns, ast.Name):
@@ -111,14 +111,14 @@ def globals_processing(tree, compilation_context):
111111
node.body[0].value, (ast.Constant, ast.Name, ast.Call)
112112
)
113113
):
114-
emit_global(compilation_context.module, node, name)
114+
_emit_global(compilation_context.module, node, name)
115115
else:
116116
raise SyntaxError(f"ERROR: Invalid syntax for {name} global")
117117

118118
return None
119119

120120

121-
def emit_llvm_compiler_used(module: ir.Module, names: list[str]):
121+
def _emit_llvm_compiler_used(module: ir.Module, names: list[str]):
122122
"""
123123
Emit the @llvm.compiler.used global given a list of function/global names.
124124
"""
@@ -164,4 +164,4 @@ def globals_list_creation(tree, compilation_context):
164164
elif isinstance(dec, ast.Name) and dec.id == "map":
165165
collected.append(node.name)
166166

167-
emit_llvm_compiler_used(module, collected)
167+
_emit_llvm_compiler_used(module, collected)

0 commit comments

Comments
 (0)