summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2019-02-06 17:16:33 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2019-02-06 17:16:33 +0000
commitc836e48841f4288da03d58fc931efbb3c162b348 (patch)
tree28c1d2bc5260d1fcd07a5f255b36363c2f841929 /llvm/lib/ObjectYAML
parent33dbcbb2bce89be1ecb4af274b9f73684854fcfa (diff)
downloadbcm5719-llvm-c836e48841f4288da03d58fc931efbb3c162b348.tar.gz
bcm5719-llvm-c836e48841f4288da03d58fc931efbb3c162b348.zip
[yaml2obj]Allow number for ELF symbol type
yaml2obj previously only recognised standard STT_* names, and didn't allow arbitrary numbers. This change allows the user to specify a number for the type instead. It also adds a test to verify the existing behaviour for obj2yaml for unkown symbol types. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D57822 llvm-svn: 353315
Diffstat (limited to 'llvm/lib/ObjectYAML')
-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 54e7be9208a..a89180dc82d 100644
--- a/llvm/lib/ObjectYAML/ELFYAML.cpp
+++ b/llvm/lib/ObjectYAML/ELFYAML.cpp
@@ -572,6 +572,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_STT>::enumeration(
ECase(STT_TLS);
ECase(STT_GNU_IFUNC);
#undef ECase
+ IO.enumFallback<Hex8>(Value);
}
void ScalarEnumerationTraits<ELFYAML::ELF_STV>::enumeration(
OpenPOWER on IntegriCloud