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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 08:28:31 PST 2016


grimar 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 think existence of such test would mean a bug in lld. 
But we have fatal() in void X86_64TargetInfo::relocateOne() for example, I also don't sure we can write a test for that.
Main point here that we probably want to output the Type of "bad" relocation. It looks in llvm it is not common to use unreachable for that (I did not found any place).
So what about assert here then ?


http://reviews.llvm.org/D18041





More information about the llvm-commits mailing list