<div dir="ltr">Hi David,<div><br></div><div>There are some LLDB tests that have been failing against clang-3.6 for a long time and just started failing in clang-3.5 when my Ubuntu distro updated clang-3.5.</div><div><br></div><div>I tracked it back to a clang CL that you submitted nearly a year ago.</div><div><br></div><div>This test passes when compiling with gcc 4.8.2 and clang-3.5 before this CL. I'm very new to the project and I don't really understand what's going on here. Any guidance you can offer would be very much appreciated.</div><div><br></div><div>Thanks,</div><div><br></div><div>Vince</div><div><br></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">------------------------------------------------------------------------</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">r202769 | dblaikie | 2014-03-03 15:48:23 -0800 (Mon, 03 Mar 2014) | 18 lines</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">DebugInfo: Emit only the declaration of a class template that has an explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition)</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">We should only have this optimization fire when the explicit</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">instantiation definition would cause at least one member function to be</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">emitted, thus ensuring that even a compiler not performing this</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">optimization would still emit the full type information elsewhere.</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">But we should also pessimize output still by always emitting the</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">definition when the explicit instantiation definition appears so that at</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">some point in the future we can depend on that information even when no</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">code had to be emitted in that TU. (this shouldn't happen very often,</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">since people mostly use explicit spec decl/defs to reduce code size -</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">but perhaps one day they could use it to explicitly reduce debug info</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">size too)</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">This was worth about 2% for Clang and LLVM - so not a huge win, but a</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">win. It looks really great for simple STL programs (include <string> and</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px">just declare a string - 14k -> 1.4k of .dwo)</span><br></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px;line-height:18px"><br></span></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><br><table cellspacing="0" cellpadding="0" style="font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Vince Harron |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Technical Lead Manager |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:vharron@google.com" target="_blank">vharron@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 858-442-0868</td></tr></tbody></table><br></div></div>
</div></div>