<div dir="ltr">It has been a while since I have fought this stuff but, as I recall, there is some relationship between the display name of a function in the debug info and the result of demangling a symbol.<div>I think a good criteria is to have Clang's display name generation for CodeView and our implementation of the demangler agree. This way we have an explainable system and any discrepency we would want to correct would result us in fixing both Clang and our demangler.</div><div><br></div><div>Even better idea: use the demangler to generate the display names in the debug info. I am pretty sure this is what MSVC does.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 20, 2017 at 10:36 AM, 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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Jun 20, 2017 at 10:17 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_4668188906508956719m_9017806765802885266WordSection1"><span>
<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"><u></u> <u></u></span></p>
</span><p class="MsoNormal"><a name="m_4668188906508956719_m_9017806765802885266__MailEndCompose"><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></p></div></div></blockquote><div><br></div></span><div>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 "<font face="monospace, monospace">int const* const* x</font>" nor "<font face="monospace, monospace">int const * const * x</font>" but "<font face="monospace, monospace">int const* const * x</font>". 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.<br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">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></div>