diff options
author | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:12:02 +0000 |
---|---|---|
committer | pierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-04-26 21:12:02 +0000 |
commit | 6781a5fdaea823e589802ca3e8960e62a3765b23 (patch) | |
tree | 42b7efa4e83a2918ccccb8beb37101c8a27c3a30 | |
parent | 678772aee893ab08024f2fc893e60bd717ea5833 (diff) | |
download | fpc-6781a5fdaea823e589802ca3e8960e62a3765b23.tar.gz |
Add a second handling of NIL entries in deflist
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49270 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | compiler/wasm32/agllvmmc.pas | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/compiler/wasm32/agllvmmc.pas b/compiler/wasm32/agllvmmc.pas index 95db60e14b..de9e0a8b99 100644 --- a/compiler/wasm32/agllvmmc.pas +++ b/compiler/wasm32/agllvmmc.pas @@ -112,13 +112,16 @@ implementation list.Concat(tai_functype.create(make_mangledname('FINALIZE$',cur_unit.u.globalsymtable,''),TWasmFuncType.Create([],[]))); end; for i:=0 to cur_unit.u.deflist.Count-1 do - if assigned(cur_unit.u.deflist[i]) and (tdef(cur_unit.u.deflist[i]).typ = procdef) then - begin - proc := tprocdef(cur_unit.u.deflist[i]); - if (not proc.owner.iscurrentunit or (po_external in proc.procoptions)) and - ((proc.paras.Count=0) or (proc.has_paraloc_info in [callerside,callbothsides])) then - thlcgwasm(hlcg).g_procdef(list,proc); - end; + begin + def:=tdef(cur_unit.u.deflist[i]); + if assigned(def) and (tdef(def).typ = procdef) then + begin + proc := tprocdef(def); + if (not proc.owner.iscurrentunit or (po_external in proc.procoptions)) and + ((proc.paras.Count=0) or (proc.has_paraloc_info in [callerside,callbothsides])) then + thlcgwasm(hlcg).g_procdef(list,proc); + end; + end; cur_unit:=tused_unit(cur_unit.Next); end; WriteTree(list); |