This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: handle <local-source-name> in demangler


Geoffrey Keating <geoffk@apple.com> writes:

> > How about adding a case to local-name?
> >
> > <local-name> ::= Z <(function) encoding> E <(entity) name> [<discriminator>]
> >              ::= Z <(function) encoding> E s [<discriminator>]
> >              ::= Z E <source-name> <discriminator>
> >
> > This is unambiguous, as 'E' can not appear at the start of <encoding>.
> > It is very unlikely that we would ever want 'E' to appear at the start
> > of <encoding>, since it is used in a number of places to mark the end
> > of a list.
> 
> You mean, in addition to the <local-source-name> change?

No, I meant that that would be the only change.  All you need is a
new way to mangle private names, right?  So then you would get, e.g.,
    _ZZE3foo_3

> This seems a little complex to me.  Maybe it would be easier to just do
> 
>      <unqualified-name> ::= <operator-name>
>                         ::= <ctor-dtor-name>
>                         ::= <source-name>
> 		       ::= <local-source-name>   // new
> 
>      <local-source-name> ::= Z E <source-name> <discriminator>  // new

I would prefer that we handle this exclusively within d_local_name, to
simplify matters.  That is what I was trying to suggest.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]