diff options
Diffstat (limited to 'lib/ObjectYAML/MachOYAML.cpp')
-rw-r--r-- | lib/ObjectYAML/MachOYAML.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/ObjectYAML/MachOYAML.cpp b/lib/ObjectYAML/MachOYAML.cpp index a033a79189bd..6b0e4e3762d0 100644 --- a/lib/ObjectYAML/MachOYAML.cpp +++ b/lib/ObjectYAML/MachOYAML.cpp @@ -230,6 +230,12 @@ void mapLoadCommandData<MachO::dylinker_command>( IO.mapOptional("PayloadString", LoadCommand.PayloadString); } +template <> +void mapLoadCommandData<MachO::build_version_command>( + IO &IO, MachOYAML::LoadCommand &LoadCommand) { + IO.mapOptional("Tools", LoadCommand.Tools); +} + void MappingTraits<MachOYAML::LoadCommand>::mapping( IO &IO, MachOYAML::LoadCommand &LoadCommand) { MachO::LoadCommandType TempCmd = static_cast<MachO::LoadCommandType>( @@ -282,6 +288,12 @@ void MappingTraits<MachOYAML::Section>::mapping(IO &IO, IO.mapOptional("reserved3", Section.reserved3); } +void MappingTraits<MachO::build_tool_version>::mapping( + IO &IO, MachO::build_tool_version &tool) { + IO.mapRequired("tool", tool.tool); + IO.mapRequired("version", tool.version); +} + void MappingTraits<MachO::dylib>::mapping(IO &IO, MachO::dylib &DylibStruct) { IO.mapRequired("name", DylibStruct.name); IO.mapRequired("timestamp", DylibStruct.timestamp); @@ -558,6 +570,23 @@ void MappingTraits<MachO::version_min_command>::mapping( IO.mapRequired("sdk", LoadCommand.sdk); } +void MappingTraits<MachO::note_command>::mapping( + IO &IO, MachO::note_command &LoadCommand) { + + IO.mapRequired("data_owner", LoadCommand.data_owner); + IO.mapRequired("offset", LoadCommand.offset); + IO.mapRequired("size", LoadCommand.size); +} + +void MappingTraits<MachO::build_version_command>::mapping( + IO &IO, MachO::build_version_command &LoadCommand) { + + IO.mapRequired("platform", LoadCommand.platform); + IO.mapRequired("minos", LoadCommand.minos); + IO.mapRequired("sdk", LoadCommand.sdk); + IO.mapRequired("ntools", LoadCommand.ntools); +} + } // namespace llvm::yaml } // namespace llvm |