summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-09-17 11:51:26 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-09-17 11:51:26 +0000
commitcfc0ba3852cac41f4881689a953a03487896c8f6 (patch)
tree7dfd536e430fdcd6cc53cb41ecfd7d55093ff871 /llvm/lib
parent778a5e57349e78b0fb7dbacd131d92b98ad0e92e (diff)
downloadbcm5719-llvm-cfc0ba3852cac41f4881689a953a03487896c8f6.tar.gz
bcm5719-llvm-cfc0ba3852cac41f4881689a953a03487896c8f6.zip
[yaml2obj/obj2yaml] - Allow setting an arbitrary values for e_machine.
Currently we only allow using a known named constants for `Machine` field in YAML documents. This patch allows using any numbers (valid or "unknown") and adds test cases for current and new functionality. With this it is possible to write a test cases for really unknown EM_* targets. Differential revision: https://reviews.llvm.org/D67652 llvm-svn: 372108
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ObjectYAML/ELFYAML.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp
index e7adb8fe4e0..940d5af94f6 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -221,6 +221,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_EM>::enumeration(
ECase(EM_LANAI);
ECase(EM_BPF);
#undef ECase
+ IO.enumFallback<Hex16>(Value);
}
void ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS>::enumeration(
OpenPOWER on IntegriCloud