mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-07 00:39:30 +01:00
* do not add references to external procedures and variables to the used
compiler symbols of the current module (useless, and moreover crashes
clang)
git-svn-id: branches/debug_eh@41215 -
This commit is contained in:
parent
1b48e6abe8
commit
016882ca82
@ -1388,13 +1388,15 @@ begin
|
|||||||
begin
|
begin
|
||||||
case srsym.typ of
|
case srsym.typ of
|
||||||
staticvarsym:
|
staticvarsym:
|
||||||
cnodeutils.RegisterUsedAsmSym(current_asmdata.RefAsmSymbol(srsym.mangledname,AT_DATA),tstaticvarsym(srsym).vardef,true);
|
if not(vo_is_external in tstaticvarsym(srsym).varoptions) then
|
||||||
|
cnodeutils.RegisterUsedAsmSym(current_asmdata.RefAsmSymbol(srsym.mangledname,AT_DATA),tstaticvarsym(srsym).vardef,true);
|
||||||
procsym:
|
procsym:
|
||||||
begin
|
begin
|
||||||
{ if it's a pure assembler routine, the definition of the symbol will also
|
{ if it's a pure assembler routine, the definition of the symbol will also
|
||||||
be in assembler and it can't be removed by the compiler (and if we mark
|
be in assembler and it can't be removed by the compiler (and if we mark
|
||||||
it as used anyway, clang will get into trouble) }
|
it as used anyway, clang will get into trouble) }
|
||||||
if not(po_assembler in tprocdef(tprocsym(srsym).ProcdefList[0]).procoptions) then
|
if not(po_assembler in tprocdef(tprocsym(srsym).ProcdefList[0]).procoptions) and
|
||||||
|
not(po_external in tprocdef(tprocsym(srsym).ProcdefList[0]).procoptions) then
|
||||||
cnodeutils.RegisterUsedAsmSym(current_asmdata.RefAsmSymbol(tprocdef(tprocsym(srsym).ProcdefList[0]).mangledname,AT_FUNCTION),tprocdef(tprocsym(srsym).ProcdefList[0]),true);
|
cnodeutils.RegisterUsedAsmSym(current_asmdata.RefAsmSymbol(tprocdef(tprocsym(srsym).ProcdefList[0]).mangledname,AT_FUNCTION),tprocdef(tprocsym(srsym).ProcdefList[0]),true);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user