feat(llvmlite): 加 module_get_func_head 跨模块访问器,供 dump 诊断遍历函数链

This commit is contained in:
TermiNexus committed 2026-08-18 08:17:51 +08:00
1 parent 1805790336
commit 37e6dd1863
1 file changed
+7
+7
View File
@@ -405,6 +405,13 @@ def module_add_function(mod: LLVMModule | t.CPtr, func: Function | t.CPtr):
return mod.add_function(func)
def module_get_func_head(mod: LLVMModule | t.CPtr) -> Function | t.CPtr:
"""获取模块函数链表头(跨模块访问器,绕 stub 字段访问陷阱)"""
if mod is None:
return None
return mod.FuncHead
def module_add_global(mod: LLVMModule | t.CPtr, gv: GlobalVariable | t.CPtr):
return mod.add_global(gv)