1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

[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
This commit is contained in:
Chris Bieneman 2016-08-11 00:20:03 +00:00
parent 1abe62abee
commit 9c5c7f22da

View File

@ -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);
}