summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML/MachOYAML.cpp
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-08-11 00:20:03 +0000
committerChris Bieneman <beanz@apple.com>2016-08-11 00:20:03 +0000
commitca5de9d9e3a30f997708cb614297dd8ca7082063 (patch)
treeaf9572be555b5d1d4aeb3eed6a6bab44f69a482a /llvm/lib/ObjectYAML/MachOYAML.cpp
parent8a22e502bdd7e4181b1b2d66b1a1da9c29a287c8 (diff)
downloadbcm5719-llvm-ca5de9d9e3a30f997708cb614297dd8ca7082063.tar.gz
bcm5719-llvm-ca5de9d9e3a30f997708cb614297dd8ca7082063.zip
[MachOYAML] Don't output empty ExportTrie
The YAML representation was always outputting the root node of an export trie even if the trie was empty. While this doesn't really have any functional impact, it does add visual clutter to the yaml file. llvm-svn: 278307
Diffstat (limited to 'llvm/lib/ObjectYAML/MachOYAML.cpp')
-rw-r--r--llvm/lib/ObjectYAML/MachOYAML.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ObjectYAML/MachOYAML.cpp b/llvm/lib/ObjectYAML/MachOYAML.cpp
index d819e80836c..5825d0042eb 100644
--- a/llvm/lib/ObjectYAML/MachOYAML.cpp
+++ b/llvm/lib/ObjectYAML/MachOYAML.cpp
@@ -138,7 +138,8 @@ void MappingTraits<MachOYAML::LinkEditData>::mapping(
IO.mapOptional("BindOpcodes", LinkEditData.BindOpcodes);
IO.mapOptional("WeakBindOpcodes", LinkEditData.WeakBindOpcodes);
IO.mapOptional("LazyBindOpcodes", LinkEditData.LazyBindOpcodes);
- IO.mapOptional("ExportTrie", LinkEditData.ExportTrie);
+ if(LinkEditData.ExportTrie.Children.size() > 0 || !IO.outputting())
+ IO.mapOptional("ExportTrie", LinkEditData.ExportTrie);
IO.mapOptional("NameList", LinkEditData.NameList);
IO.mapOptional("StringTable", LinkEditData.StringTable);
}
OpenPOWER on IntegriCloud