Apply patch from binutils to demangle local-source names. Binutils

Wed Jun  4 21:52:17 2008  Søren Sandmann  <sandmann@redhat.com>

	* demangle.c: Apply patch from binutils to demangle local-source
	names. Binutils changelog:

	2007-05-05  Geoffrey Keating  <geoffk@apple.com>

		* cp-demangle.c (d_name): Detect local-source-name.
		(d_prefix): Likewise.
		(d_unqualified_name): Implement local-source-name.

	* sysprof.c: Update copyright statement
	


svn path=/trunk/; revision=434
This commit is contained in:
Geoffrey Keating
2008-06-05 02:09:33 +00:00
committed by Søren Sandmann Pedersen
parent 155221f446
commit e11dfce31f
5 changed files with 60 additions and 11 deletions

View File

@ -1944,7 +1944,8 @@ d_prefix (di)
if (IS_DIGIT (peek)
|| IS_LOWER (peek)
|| peek == 'C'
|| peek == 'D')
|| peek == 'D'
|| peek == 'L')
dc = d_unqualified_name (di);
else if (peek == 'S')
dc = d_substitution (di, 1);
@ -1978,6 +1979,9 @@ d_prefix (di)
/* <unqualified-name> ::= <operator-name>
::= <ctor-dtor-name>
::= <source-name>
::= <local-source-name>
<local-source-anem> ::= L <source-name><discriminator>
*/
static struct demangle_component *
@ -2000,6 +2004,19 @@ d_unqualified_name (di)
}
else if (peek == 'C' || peek == 'D')
return d_ctor_dtor_name (di);
else if (peek == 'L')
{
struct demangle_component * ret;
d_advance (di, 1);
ret = d_source_name (di);
if (ret == NULL)
return NULL;
if (! d_discriminator (di))
return NULL;
return ret;
}
else
return NULL;
}