<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 21, 2016 at 10:52 AM, Vedant Kumar <span dir="ltr"><<a href="mailto:vsk@apple.com" target="_blank">vsk@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vsk added a comment.<br>
<br>
Nice, just one concern.<br>
<br>
<br>
================<br>
Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:615<br>
@@ +614,3 @@<br>
<span class="">+      ProfileNameVar->setComdat(M->getOrInsertComdat(<br>
+          StringRef(INSTR_PROF_QUOTE(INSTR_PROF_PROFILE_NAME_VAR))));<br>
+  }<br>
</span>----------------<br>
What's the advantage of placing the file name var in a comdat if it already has weak linkage? Would some ELF tests break without this?<br>
<br></blockquote><div><br></div><div>It won't break, but the final binary will contain more than one copies of the symbols which wastes space. With Comdat, there is only one copy in the final link. Note current behavior (with private linkage will also result in multiple copies which is fixed here).</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="https://reviews.llvm.org/D22613" rel="noreferrer" target="_blank">https://reviews.llvm.org/D22613</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>