<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 11:07 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">>> What is the issue with private on COFF? For ELF at least private is<br>
>> the correct choice for this.<br>
><br>
><br>
> We explicitly forbid making private linkage entities COMDAT here:<br>
> <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?revision=230707&view=markup#l859" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?revision=230707&view=markup#l859</a><br>
<br>
</span>In this case the ComdatGV would be the function, which is not private, no?<br></blockquote><div><br></div><div>I was referring to the case where the function has internal linkage (and we have EmitUniquedSection enabled for data sections).  The global would be private and it wouldn't be possible to  stick it in a COMDAT.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Medium term, we should probably change CodeGen to handle private for<br>
COFF in all cases. Is the issue that COFF requires a "normal" symbol<br>
to be the symbol identifying the comdat? If so, CodeGen should just<br>
output of the symbol even if it is private when it is the "id" of a<br>
comdat.<br></blockquote><div><br></div><div>Yes, we don't have a symbol table entry at all and things explode.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
This is similar to the change that was done for MachO in<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=18743" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=18743</a>. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>