[PATCH] D18041: [ELF] use fatal() instead of llvm_unreachable when performing relaxations.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 14:27:41 PST 2016


silvas added a subscriber: silvas.
silvas added a comment.

In http://reviews.llvm.org/D18041#371932, @rafael wrote:

> fatal should only be used if this is actually reachable. Can you write
>  a testcase that shows that you can reach each of these?
>
> Cheers,
> Rafael


I agree. The one in relocateOne is I think actually a proper use of fatal() because it can be reached by an object file with an unknown relocation (say, some weird platform-specific relocation). For the TLS optimization ones, I think it is actually unreachable since it would otherwise indicate that canRelaxTlx and relaxTls are out of sync.


http://reviews.llvm.org/D18041





More information about the llvm-commits mailing list