<p dir="ltr">I agree.</p>
<div class="gmail_quote">07 нояб. 2013 г. 23:30 пользователь "Reid Kleckner" <<a href="mailto:rnk@google.com">rnk@google.com</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>I'm not sure.  We should add some way to do this if we don't like the status quo.  I recall Manman used mangleCXXRTTI for debug info.  We could expose mangleType() somehow instead.</div><div></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 7, 2013 at 2:17 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2013/11/6 Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>>:<br>
<div>> The C++ name mangler already knows how to compute a unique string per class.<br>
<br>
</div>How do you suggest to do that?<br>
It hits an assertion if I try to use mangleName/mangleCXXName to mangle a RD.<br>
<div><div><br>
> If you want a pretty string, probably the best way to get that is to mangle<br>
> a string and then demangle it.<br>
><br>
><br>
> On Wed, Nov 6, 2013 at 3:34 AM, Jesper Eskilson <<a href="mailto:jesper.eskilson@iar.com" target="_blank">jesper.eskilson@iar.com</a>><br>
> wrote:<br>
>><br>
>><br>
>> Hi,<br>
>><br>
>> I'm trying to find a way to construct a string which uniquely identify a<br>
>> class such that different template instantiations yields a different string.<br>
>> Say thay I have a class template A:<br>
>><br>
>> template<class T> class A;<br>
>> A *a = new A<int>();<br>
>><br>
>> then if I start from the CXXConstructExpr:<br>
>><br>
>> ctorExpr->getConstructor()->getQualifiedNameAsString()<br>
>><br>
>> it will get be "A<int>::A".<br>
>><br>
>> But say that I have another class B which inherits from A:<br>
>><br>
>> class B : public A<int> {<br>
>> };<br>
>><br>
>> B *b = new B;<br>
>><br>
>> How do I find out how A is templatized? Ideally I would like to get out a<br>
>> string such as "A<int>", but the closest I get is to do<br>
>><br>
>> CXXBaseSpecifier base = ;<br>
>> base.getType()->getAsCXXRecordDecl()->getQualifiedNameAsString();<br>
>><br>
>> but this will only give me "A". How do I find out the template parameters<br>
>> used when instantiating A?<br>
>><br>
>> --<br>
>> *Jesper Eskilson* /Development Engineer/<br>
>> IAR Systems AB<br>
>> Box 23051, Strandbodgatan 1<br>
>> SE-750 23 Uppsala, SWEDEN<br>
>> E-mail: <a href="mailto:jesper.eskilson@iar.com" target="_blank">jesper.eskilson@iar.com</a> <mailto:<a href="mailto:jesper.eskilson@iar.com" target="_blank">jesper.eskilson@iar.com</a>><br>
>> Website: <a href="http://www.iar.com" target="_blank">www.iar.com</a><br>
>> <<a href="http://www.iar.com" target="_blank">http://www.iar.com</a>> Twitter: <a href="http://www.twitter.com/iarsystems" target="_blank">www.twitter.com/iarsystems</a><br>
>> <<a href="http://www.twitter.com/iarsystems" target="_blank">http://www.twitter.com/iarsystems</a>><br>
>> _______________________________________________<br>
>> cfe-dev mailing list<br>
>> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
</div></div></blockquote></div><br></div>
</blockquote></div>