diff options
author | Chris Bieneman <beanz@apple.com> | 2016-05-12 18:21:09 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2016-05-12 18:21:09 +0000 |
commit | fc8892771e3610d84220221ecf074f471ec0a208 (patch) | |
tree | db636f330030a53fd08a286cebf66be4af3eca30 /llvm/lib/ObjectYAML/MachOYAML.cpp | |
parent | 26e6cea9068cd2184831c3a1f81987c265f50caa (diff) | |
download | bcm5719-llvm-fc8892771e3610d84220221ecf074f471ec0a208.tar.gz bcm5719-llvm-fc8892771e3610d84220221ecf074f471ec0a208.zip |
[yaml2macho] Handle mach_header_64 reserved field
I've added the reserved field as an "optional" in YAML, but I've added asserts in the yaml2macho code to enforce that the field is present in mach_header_64, but not in mach_header.
llvm-svn: 269320
Diffstat (limited to 'llvm/lib/ObjectYAML/MachOYAML.cpp')
-rw-r--r-- | llvm/lib/ObjectYAML/MachOYAML.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/ObjectYAML/MachOYAML.cpp b/llvm/lib/ObjectYAML/MachOYAML.cpp index c33f54f9c50..d54140b6794 100644 --- a/llvm/lib/ObjectYAML/MachOYAML.cpp +++ b/llvm/lib/ObjectYAML/MachOYAML.cpp @@ -27,6 +27,8 @@ void MappingTraits<MachOYAML::FileHeader>::mapping( IO.mapRequired("ncmds", FileHdr.ncmds); IO.mapRequired("sizeofcmds", FileHdr.sizeofcmds); IO.mapRequired("flags", FileHdr.flags); + IO.mapOptional("reserved", FileHdr.reserved, + static_cast<llvm::yaml::Hex32>(0xDEADBEEFu)); } void MappingTraits<MachOYAML::Object>::mapping(IO &IO, |