<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 21, 2016 at 2:03 AM, George Rimar via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@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"><span class="">>> +template <class ELFT><br>
>> +void EhFrameHeader<ELFT>::assignEhFrame(EHOutputSection<ELFT> *Sec) {<br>
>> +  if (this->Sec && this->Sec != Sec) {<br>
>> +    warning("multiple .eh_frame sections not supported for .eh_frame_hdr");<br>
>> +    Live = false;<br>
>> +    return;<br>
><br>
>Can this warning ever fire? If not it should be just an assert.<br>
<br>
</span>In current code this should never be fired. I was just afraid about future changes, I am not sure about what can be done with linkerscript,<br>
for example and if it is possible to fire it. I think we can replace warning + "Live = false" with llvm_unreachable for now then, will it be ok ?<br></blockquote><div><br></div><div>If something should never happen unless there is a bug (which is the case), please use llvm_unreachable(). If it is reachable by doing something bad as a user (such as giving corrupted files to the linker, passing invalid options, etc), then use warning() or error(). </div></div></div></div>