[lld] r258670 - Use of assert instead of llvm_unreachable in EhFrameHeader<ELFT>::assignEhFrame().

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 11:34:27 PST 2016


>This assertion will never fail because converting a string to a boolean is always true (a non-null pointer is always true)
>
>This should be:
>
>assert((!this->Sec || this->Sec == Sec) && "multiple .eh_frame sections ... ");

I wanted to write assert(false, "..") and missed the first part. Your way is bit better.
Thanks !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160125/0691683f/attachment.html>


More information about the llvm-commits mailing list