Files
ViperC/App
TermiNexus 8b2008031d fix(gen): 模块前言 C 库声明名改落 PermPool,避免被回绕的模块池覆盖
现象:@malloc 的声明名被渲染成乱码,mlir-opt 报 llvm.call @malloc does not reference a symbol in the current scope。根因:create_declare 用 _str_dup(pool, name) 把名字拷进传入的池,而前言用的是模块池(大模块上会被复用/回绕),早期分配的声明名被后续分配覆盖;类型是 mlirlite 内部 interned 的,所以只有名字坏、参数类型正常。修法:声明与参数名改落 CompilerFactory.PermPool(never reset)。
2026-10-08 22:30:07 +08:00
..