mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-31 18:44:48 +01:00
wrestle name-mangling into a state that is compatible with the
BeOS-libraries. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9616 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
41475e74b5
commit
c21fc23a27
@ -317,7 +317,11 @@ old_backref_index (type)
|
|||||||
/* The entry for this parm is at maxtype-1, so don't look there for
|
/* The entry for this parm is at maxtype-1, so don't look there for
|
||||||
something to repeat. */
|
something to repeat. */
|
||||||
for (tindex = 0; tindex < maxtype - 1; ++tindex)
|
for (tindex = 0; tindex < maxtype - 1; ++tindex)
|
||||||
|
#ifdef USE_EGCS_MANGLED_NAMES
|
||||||
|
if (typevec[tindex] == type)
|
||||||
|
#else /* USE_EGCS_MANGLED_NAMES */
|
||||||
if (same_type_p (typevec[tindex], type))
|
if (same_type_p (typevec[tindex], type))
|
||||||
|
#endif /* USE_EGCS_MANGLED_NAMES */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (tindex == maxtype - 1)
|
if (tindex == maxtype - 1)
|
||||||
@ -346,6 +350,17 @@ flush_repeats (nrepeats, type)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __BEOS__
|
||||||
|
if (TREE_CODE(type) == POINTER_TYPE
|
||||||
|
&& TREE_CODE(TREE_TYPE(type)) == ARRAY_TYPE)
|
||||||
|
{
|
||||||
|
/* [zooey]: Do not use repetition codes for array-pointers, but output
|
||||||
|
the full mangled type for every occurrence (for BeOS) */
|
||||||
|
build_mangled_name_for_type (type);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (nrepeats > 1)
|
if (nrepeats > 1)
|
||||||
{
|
{
|
||||||
OB_PUTC ('N');
|
OB_PUTC ('N');
|
||||||
@ -1176,7 +1191,11 @@ build_mangled_name (parmtypes, begin, end)
|
|||||||
typevec[maxtype++] = parmtype;
|
typevec[maxtype++] = parmtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_EGCS_MANGLED_NAMES
|
||||||
|
if (last_type && (parmtype == last_type))
|
||||||
|
#else /* USE_EGCS_MANGLED_NAMES */
|
||||||
if (last_type && same_type_p (parmtype, last_type))
|
if (last_type && same_type_p (parmtype, last_type))
|
||||||
|
#endif /* USE_EGCS_MANGLED_NAMES */
|
||||||
{
|
{
|
||||||
if (flag_do_squangling
|
if (flag_do_squangling
|
||||||
|| (old_style_repeats
|
|| (old_style_repeats
|
||||||
@ -1334,7 +1353,10 @@ process_overload_item (parmtype, extra_Gcode)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tree length = array_type_nelts (parmtype);
|
tree length = array_type_nelts (parmtype);
|
||||||
|
#ifndef __BEOS__
|
||||||
|
// *always* add one under BeOS...
|
||||||
if (TREE_CODE (length) != INTEGER_CST || flag_do_squangling)
|
if (TREE_CODE (length) != INTEGER_CST || flag_do_squangling)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
length = fold (build (PLUS_EXPR, TREE_TYPE (length),
|
length = fold (build (PLUS_EXPR, TREE_TYPE (length),
|
||||||
length, integer_one_node));
|
length, integer_one_node));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user