This commit is contained in:
araq
2025-11-25 20:29:12 +01:00
parent 0cb4b3dd22
commit e23af0cefe
2 changed files with 7 additions and 3 deletions

View File

@@ -3471,6 +3471,10 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
genProcPrototype(p.module, sym)
else:
genProc(p.module, sym)
# For cross-module inline procs with optCompress, ensure prototype is emitted
if sym.typ.callConv == ccInline and optCompress in p.config.globalOptions and
sym.itemId.module != p.module.module.position:
genProcPrototype(p.module, sym)
if sym.loc.snippet == "" or sym.loc.lode == nil:
internalError(p.config, n.info, "expr: proc not init " & sym.name.s)
putLocIntoDest(p, d, sym.loc)

View File

@@ -1518,9 +1518,9 @@ proc genProcNoForward(m: BModule, prc: PSym) =
fillProcLoc(m2, prc.ast[namePos])
#elif {sfExportc, sfImportc} * prc.flags == {}:
# # reset name to restore consistency in case of hashing collisions:
# echo "resetting ", prc.id, " by ", m.module.name.s
# prc.loc.snippet = nil
# prc.loc.snippet = mangleName(m, prc)
# #echo "resetting ", prc.id, " by ", m.module.name.s
# #prc.loc.snippet = nil
# #prc.loc.snippet = mangleName(m, prc)
genProcPrototype(m, prc)
genProcAux(m, prc)
elif sfImportc notin prc.flags: