[yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocation...
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 20 Sep 2019 09:15:36 +0000 (09:15 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 20 Sep 2019 09:15:36 +0000 (09:15 +0000)
commit4d69967f44116b4ad4b2810633045ffed119f7c3
treea603672392fbd263b425fafb5856b34057139612
parent15e27b0b6d9d51362fad85dbe95ac5b3fadf0a06
[yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocations and e_machine is unsupported.

Currently when e_machine is set to something that is not supported by YAML lib,
then tools fail with llvm_unreachable.

In this patch I allow them to handle relocations in this case.
It can be used to dump and create objects for broken or unsupported targets.

Differential revision: https://reviews.llvm.org/D67657

llvm-svn: 372377
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/obj2yaml/relocation-unsupported-machine.yaml [new file with mode: 0644]
llvm/test/tools/yaml2obj/relocation-unsupported-machine.yaml [new file with mode: 0644]