mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 03:39:28 +02:00
* fixed r27320 for darwin, as its mangled names get prefixed with '_'
and hence the generated mangled name did not start with a '$' as expected git-svn-id: trunk@27357 -
This commit is contained in:
parent
381d09d03f
commit
0edb7b2288
@ -392,7 +392,17 @@ implementation
|
||||
not (def.typ in [arraydef,recorddef,variantdef,objectdef,procvardef]) or
|
||||
((def.typ=objectdef) and not is_object(def)) then
|
||||
internalerror(201202101);
|
||||
defaultname:=make_mangledname('$zero',def.owner,def.typesym.Name);
|
||||
{ extra '$' prefix because on darwin the result of makemangledname
|
||||
is prefixed by '_' and hence adding a '$' at the start of the
|
||||
prefix passed to makemangledname doesn't help (the whole point of
|
||||
the copy() operation below is to ensure that the id does not start
|
||||
with a '$', because that is interpreted specially by the symtable
|
||||
routines -- that's also why we prefix with '$_', so it will still
|
||||
work if make_mangledname() would somehow return a name that already
|
||||
starts with '$' }
|
||||
defaultname:='$_'+make_mangledname('zero',def.owner,def.typesym.Name);
|
||||
{ can't hardcode the position of the '$', e.g. on darwin an underscore
|
||||
is added }
|
||||
hashedid.id:=copy(defaultname,2,255);
|
||||
{ the default sym is always part of the current procedure/function }
|
||||
srsymtable:=current_procinfo.procdef.localst;
|
||||
|
Loading…
Reference in New Issue
Block a user