This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [PATCH] libiberty: support demangling of rvalue reference typenames


On Mon, Jan 04, 2016 at 10:06:44PM -0800, Ian Lance Taylor wrote:
> Artemiy Volkov <artemiyv@acm.org> writes:
> 
> > This patch adds handling of 'O' (rvalue ref) type codes in the C++ demangling
> > code which is done similarly to the 'R' (regular references) case. It also adds
> > a few testcases for various demangling styles which are just mirrored versions
> > of the corresponding regular references demangling tests.
> >
> > libiberty/ChangeLog:
> >
> > 2016-01-04  Artemiy Volkov  <artemiyv@acm.org>
> >
> >         * cplus-dem.c (enum type_kind_t): Add tk_rvalue_reference
> >         constant.
> >         (demangle_template_value_parm): Handle tk_rvalue_reference
> >         type kind.
> >         (do_type): Support 'O' type id (rvalue references).
> 
> Is there a compiler that actually generate these symbols?

Sure, at least gcc and clang generate this. E.g. when compiling:

void f(int&& b) { }

you then have:

â nm 1.o 
0000000000000000 T _Z1fOi

> 
> Ian


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