[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] How to demangle _ZN3foocvPT_I3barEEv?
From:       Richard Smith <richard () metafoo ! co ! uk>
Date:       2013-02-11 19:02:10
Message-ID: CAOfiQqmfkFUGtxPQFx6jr_N2ccL=md=1MveS-4_XYmP9KRn=_Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Feb 11, 2013 at 7:05 AM, Marshall Clow <mclow.lists@gmail.com>wrote:

> On Monday 11 February 2013 14:06:45 fakju666 wrote:
> > Can anyone tell me what this is supposed to demangle to:
> >
> > _ZN3foocvPT_I3barEEv
> >
> > I got this in a call graph generated by opt, and this is the only name
> that
> > c++filt can't process. I think the problem is with the "T_" identifier,
> > because c++filt is happy if I replace it with "S_":
> >
> > foo::operator foo<bar>*()
>
> $ c++filt -n _ZN3foocvPT_I3barEEv
> foo::operator bar*<bar>()


This is the right answer (or, prior to substitution, template<typename T>
foo::operator T*(), with T = bar).

This case is a little hard to demangle, since it's /almost/ ambiguous. It
could be conversion to PT_ (that is, "operator template-type-parameter-0
*"), instantiated with <bar>, or it could be conversion to PT_I3barE (that
is, "operator template-template-parameter-0<bar> *"). But it actually can't
be the latter, since the use of the template-template-parameter implies
that we need to specify template arguments, so we'd expect another template
argument list: _ZN3foocvPT_I3barEI3bazEEv.

[Attachment #5 (text/html)]

On Mon, Feb 11, 2013 at 7:05 AM, Marshall Clow <span dir="ltr">&lt;<a \
href="mailto:mclow.lists@gmail.com" \
target="_blank">mclow.lists@gmail.com</a>&gt;</span> wrote:<br><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On Monday 11 February 2013 14:06:45 fakju666 wrote:<br>
&gt; Can anyone tell me what this is supposed to demangle to:<br>
&gt;<br>
&gt; _ZN3foocvPT_I3barEEv<br>
&gt;<br>
&gt; I got this in a call graph generated by opt, and this is the only name that<br>
&gt; c++filt can&#39;t process. I think the problem is with the &quot;T_&quot; \
identifier,<br> &gt; because c++filt is happy if I replace it with \
&quot;S_&quot;:<br> &gt;<br>
&gt; foo::operator foo&lt;bar&gt;*()<br>
<br>
</div>$ c++filt -n _ZN3foocvPT_I3barEEv<br>
foo::operator bar*&lt;bar&gt;()</blockquote><div><br></div><div>This is the right \
answer (or, prior to substitution, template&lt;typename T&gt; foo::operator T*(), \
with T = bar).</div><div><br></div><div>This case is a little hard to demangle, since \
it&#39;s /almost/ ambiguous. It could be conversion to PT_ (that is, &quot;operator \
template-type-parameter-0 *&quot;), instantiated with &lt;bar&gt;, or it could be \
conversion to PT_I3barE (that is, &quot;operator \
template-template-parameter-0&lt;bar&gt; *&quot;). But it actually can&#39;t be the \
latter, since the use of the template-template-parameter implies that we need to \
specify template arguments, so we&#39;d expect another template argument list: \
_ZN3foocvPT_I3barEI3bazEEv.</div> </div>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic