[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)
commit6a5d9ef0f45231102193510a0431e4f047d3aa96
tree3ac41a6a97a13ec6b564c5dbadd2791bda69895a
parentd2ee0056e86e210587480d0314057e80c7887b29
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372377 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/ELFYAML.cpp
test/tools/obj2yaml/relocation-unsupported-machine.yaml [new file with mode: 0644]
test/tools/yaml2obj/relocation-unsupported-machine.yaml [new file with mode: 0644]