<div dir="ltr">They are LGPL, so I think we cannot use them.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 27, 2017 at 1:17 AM, Qian Hong <span dir="ltr"><<a href="mailto:fracting@gmail.com" target="_blank">fracting@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry for didn't post earlier, has anyone checked <a href="http://mingw-w64.sourceforge.net/libmangle/" target="_blank">http://mingw-w64.<wbr>sourceforge.net/libmangle/</a> ?<div><br></div><div>Also the Wine project has some code which might be useful as reference / test case:</div><div><br></div><div><a href="https://github.com/wine-mirror/wine/blob/master/dlls/msvcrt/undname.c" target="_blank">https://github.com/wine-<wbr>mirror/wine/blob/master/dlls/<wbr>msvcrt/undname.c</a></div><div><a href="https://github.com/wine-mirror/wine/blob/master/dlls/msvcrt/tests/cpp.c#L1098" target="_blank">https://github.com/wine-<wbr>mirror/wine/blob/master/dlls/<wbr>msvcrt/tests/cpp.c#L1098</a></div><div><br></div><div><br><div><br></div></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Tue, Jun 27, 2017 at 3:53 PM, Rui Ueyama via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I uploaded a FYI patch (not intended for submission) as <a href="https://reviews.llvm.org/D34667" target="_blank">https://reviews.llvm.org/D3<wbr>4667</a>. If you want to take a look and comment on its design, please do so. Thanks!</div><div class="m_2163167943378672933HOEnZb"><div class="m_2163167943378672933h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 5:25 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Please add me on reviews. BTW, even differing in whitespace might cause problems, I know their tools have some builtin assumptions about whitespace in type names. How deeply engrained this is is not clear though.</div><br><div class="gmail_quote"><div><div class="m_2163167943378672933m_1127152805638314648h5"><div dir="ltr">On Fri, Jun 23, 2017 at 10:10 AM Rui Ueyama via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_2163167943378672933m_1127152805638314648h5"><div dir="ltr">FYI, I started writing a demangler. I think I can send an initial patch to review in a few days.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 20, 2017 at 11:07 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jun 20, 2017 at 10:51 AM, Robinson, Paul <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_2163167943378672933m_1127152805638314648m_704110178851682178m_1202957032250130436m_7090912256896527143m_8157747094736287842WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">If it's only whitespace differences, that's easy to accommodate. If there are other cases that don't work, maybe don't use this tactic for those, if we have
a good reason for being different. As they say, don't throw the baby out with the bathwater.</span></p></div></div></blockquote><div><br></div></span><div>I'll try to keep the difference only in whitespace.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div class="m_2163167943378672933m_1127152805638314648m_704110178851682178m_1202957032250130436m_7090912256896527143m_8157747094736287842WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p>
<p class="MsoNormal"><a name="m_2163167943378672933_m_1127152805638314648_m_704110178851682178_m_1202957032250130436_m_7090912256896527143_m_8157747094736287842__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> David Blaikie [mailto:<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, June 20, 2017 10:39 AM<br>
<b>To:</b> Rui Ueyama; Robinson, Paul<br>
<b>Cc:</b> Martin J. O'Riordan; <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><span><br>
<b>Subject:</b> Re: [llvm-dev] VC C++ demangler<u></u><u></u></span></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Yeah, may well be the case - I don't /think/ LLVM quite matches the exact syntax of the GCC demangler either (I seem to recall constants as non-type template parameters were a bit different).<u></u><u></u></p>
</div><div><div class="m_2163167943378672933m_1127152805638314648m_704110178851682178m_1202957032250130436m_7090912256896527143h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jun 20, 2017 at 10:36 AM Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<p class="MsoNormal">On Tue, Jun 20, 2017 at 10:17 AM, Robinson, Paul <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">
Just to be clear - once LLVM has its own demangler, it should probably use it on all platforms, so there'd be no worry about different behavior between LLVM on Windows and LLVM elsewhere.<br>
<br>
But that said, it's probably still important/worthwhile to make sure it's consistent with the platform demangler.<u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><a name="m_2163167943378672933_m_1127152805638314648_m_704110178851682178_m_1202957032250130436_m_7090912256896527143_m_8157747094736287842_m_5326319421298086072_m_9017806765802885"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Personally I would be all for a unit test program
that verified against the Windows API when run on Windows, and against canned output on non-Windows.</span></a><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">That was my preference too, but looks like getting the exact same results as the Windows API is not that easy nor worthwhile when it comes to arbitrary formatting rules. For example, IIRC, UnDecorateSymbolName generates not "<span style="font-family:"Courier New"">int
const* const* x</span>" nor "<span style="font-family:"Courier New"">int const * const * x</span>" but "<span style="font-family:"Courier New"">int const* const * x</span>". This is simply odd, and I'd guess we don't want to mimic all these corner cases. So
mixing our own demangler and the Windows demangler can cause unnecessary churn.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div></div></div>
</div>
</div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div></div><span>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</span></blockquote></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_2163167943378672933gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,<br>Qian Hong<br></div></div></div>
</font></span></div>
</blockquote></div><br></div>