<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">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_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><div>I'll try to keep the difference only in whitespace.</div><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_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_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 class=""><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="h5">
<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_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></div><br></div></div>