<div dir="ltr">Here is result of experiment:<div><br></div><div>(Original size , with <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">DW_AT_linkage_name for composites, % increase)</span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">clang-7.0 </span>1926574256 1952846192   1.4%</span><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px">clang-tidy 1220980360 1238498112   1.4%</span><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px">llvm-mt  7404728 7525328 1.6 %</span></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px">std::cout << "hello world!" </span></span><span style="white-space:pre-wrap;font-size:12.8px">21552 22080  </span><span style="white-space:pre-wrap;font-size:12.8px"> 2.4 %</span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px"><br></span></span></div><div><span style="font-size:12.8px">IMO, not that big price for reliable dynamic type identification (Full disclosure: I need depend on this feature, since I'm writing Python pretty printers for GDB )</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="text-align:start;text-indent:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span style="font-size:12.8px">-Roman</span></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-02 18:12 GMT-08:00 Roman Popov <span dir="ltr"><<a href="mailto:ripopov@gmail.com" target="_blank">ripopov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Mangled names can be long indeed, but pretty-printed types are also long. I can evaluate effect on size on clang codebase itself.</div><div><br></div><div>If you disable RTTI, than obviously you can't use it. So if RTTI is disabled, we can disable mangled names in DWARF. Clang is compiled without standard C++ RTTI because it has it's own RTTI. In general, however, many libraries use standard RTTI. </div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2018-03-02 17:43 GMT-08:00  <span dir="ltr"><<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>> Currently what debugger has to do is to demangle RTTI name and try to<br>
> match it to DW_AT_name attribute to find type. As you can see it does<br>
> not work for any of 3 examples.<br>
><br>
> I've asked about the problem on G++ maillist, and one of the proposed<br>
> solutions is to emit DW_AT_linkage_name for types. <br>
><br>
> Can this solution be also implemented in LLVM? <br>
<br>
</span>It could, but mangled names can be very long and we need to consider<br>
whether the additional size cost is worth it under various conditions.<br>
For example, does this type matching work when a program is compiled<br>
with `-fno-rtti`?  (Clang itself is compiled this way by default.)<br>
Thanks,<br>
--paulr<br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>