diff --git a/App/lib/core/Gen/Call/CallGenDispatch.vp b/App/lib/core/Gen/Call/CallGenDispatch.vp index b2e09fb..d614aa1 100644 --- a/App/lib/core/Gen/Call/CallGenDispatch.vp +++ b/App/lib/core/Gen/Call/CallGenDispatch.vp @@ -244,7 +244,10 @@ novirtual class CallGenDispatch(CallGenBase.CallGenBase): if fp is not None: fp = llvmlite.param_get_next(fp) ai += 1 - return llvmlite.build_call(builder, func, head, int(can), ret_ty, 0) + # build_call 的第二参是**被调符号名字符串**(callee: str),不是 Function*—— + # 传 Function* 会被当成字符串读到结构体首字段(Next 指针),发射出 + # `call i32 @(i32 7)`(空名字)这种非法 IR。这里用查找时同一符号名。 + return llvmlite.build_call(builder, spec_name, head, int(can), ret_ty, 0) def _tc_h1_super_ctraits(self, pool: memhub.MemBuddy*, builder: llvmlite.IRBuilder*,