[yaml2obj/obj2yaml] - Do not trigger llvm_unreachable when dumping/parsing relocation...
commit31eec06d967c69a3b38610d08277630a7ff16e91
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 20 Sep 2019 09:15:36 +0000 (20 09:15 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 20 Sep 2019 09:15:36 +0000 (20 09:15 +0000)
tree3ac41a6a97a13ec6b564c5dbadd2791bda69895a
parent126787e9a4530408b389c225e3bd9dc67c1e46bf
[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]