fix(generic-func): 发射特化调用改传符号名(callee: str)而非 Function*,修复生成空 @ 的非法 IR
This commit is contained in:
1 parent
df1ffa4c2a
commit
feb29fa7a3
1 file changed
+4
-1
@@ -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*,
|
||||
|
||||
Reference in new issue
Block a user