[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 09:27:09 PST 2016


>>
>> I think existence of such test would mean a bug in lld.
>
>In which case that is exactly what assert/llvm_unreachable are for.
>
>> But we have fatal() in void X86_64TargetInfo::relocateOne() for example, I also don't sure we can write a test for that.
>
>It should be possible with at .o with an invalid reloc number, no?
>
>So the summary is that if you can reach something without a bug, that
>should be a fatal/error. If getting there is a a bug, it should be
>llvm_unreachable.

Ok, so can I replace with assert() then ? (for http://reviews.llvm.org/D18041).
I want to output the Type of relocation, like I did when used fatal.

>Cheers,
>Rafael

George.


More information about the llvm-commits mailing list