blob: 48217af54b700330fb016faae3bfb6e21ffc5d92 [file] [log] [blame]
Chris Bieneman9062ab92016-05-12 16:04:16 +00001//===- MachOYAML.cpp - MachO YAMLIO implementation ------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines classes for handling the YAML representation of MachO.
11//
12//===----------------------------------------------------------------------===//
13
14#include "llvm/ObjectYAML/MachOYAML.h"
15#include "llvm/Support/Casting.h"
Chris Bieneman3f2eb832016-05-17 19:44:06 +000016#include "llvm/Support/Format.h"
17
Chris Bieneman2de17d42016-05-18 16:17:23 +000018#include <string.h> // For memcpy, memset and strnlen.
Chris Bieneman9062ab92016-05-12 16:04:16 +000019
20namespace llvm {
21
Chris Bieneman8b5906e2016-05-13 17:41:41 +000022MachOYAML::LoadCommand::~LoadCommand() {}
23
Chris Bieneman9062ab92016-05-12 16:04:16 +000024namespace yaml {
25
Chris Bieneman3f2eb832016-05-17 19:44:06 +000026void ScalarTraits<char_16>::output(const char_16 &Val, void *,
27 llvm::raw_ostream &Out) {
Chris Bieneman2de17d42016-05-18 16:17:23 +000028 auto Len = strnlen(&Val[0], 16);
29 Out << StringRef(&Val[0], Len);
Chris Bieneman3f2eb832016-05-17 19:44:06 +000030}
31
32StringRef ScalarTraits<char_16>::input(StringRef Scalar, void *, char_16 &Val) {
33 size_t CopySize = 16 >= Scalar.size() ? 16 : Scalar.size();
34 memcpy((void *)Val, Scalar.data(), CopySize);
35
36 if (Scalar.size() < 16) {
37 memset((void *)&Val[Scalar.size()], 0, 16 - Scalar.size());
38 }
39
40 return StringRef();
41}
42
43bool ScalarTraits<char_16>::mustQuote(StringRef S) { return needsQuotes(S); }
44
45void ScalarTraits<uuid_t>::output(const uuid_t &Val, void *,
46 llvm::raw_ostream &Out) {
47 for (int Idx = 0; Idx < 16; ++Idx) {
48 Out << format("%02" PRIX32, Val[Idx]);
49 if (Idx == 3 || Idx == 5 || Idx == 7 || Idx == 9)
50 Out << "-";
51 }
52}
53
54StringRef ScalarTraits<uuid_t>::input(StringRef Scalar, void *, uuid_t &Val) {
55 size_t OutIdx = 0;
56 for (size_t Idx = 0; Idx < Scalar.size(); ++Idx) {
57 if (Scalar[Idx] == '-' || OutIdx >= 16)
58 continue;
59 unsigned long long TempInt;
60 if (getAsUnsignedInteger(Scalar.slice(Idx, Idx + 2), 16, TempInt))
61 return "invalid number";
62 if (TempInt > 0xFF)
63 return "out of range number";
64 Val[OutIdx] = static_cast<uint8_t>(TempInt);
65 ++Idx; // increment idx an extra time because we're consuming 2 chars
66 ++OutIdx;
67 }
68 return StringRef();
69}
70
71bool ScalarTraits<uuid_t>::mustQuote(StringRef S) { return needsQuotes(S); }
72
Chris Bieneman9062ab92016-05-12 16:04:16 +000073void MappingTraits<MachOYAML::FileHeader>::mapping(
74 IO &IO, MachOYAML::FileHeader &FileHdr) {
Chris Bieneman24f07472016-05-12 17:44:43 +000075 IO.mapRequired("magic", FileHdr.magic);
Chris Bieneman9062ab92016-05-12 16:04:16 +000076 IO.mapRequired("cputype", FileHdr.cputype);
77 IO.mapRequired("cpusubtype", FileHdr.cpusubtype);
Chris Bieneman668beb22016-05-12 17:53:01 +000078 IO.mapRequired("filetype", FileHdr.filetype);
Chris Bieneman9062ab92016-05-12 16:04:16 +000079 IO.mapRequired("ncmds", FileHdr.ncmds);
Chris Bieneman24f07472016-05-12 17:44:43 +000080 IO.mapRequired("sizeofcmds", FileHdr.sizeofcmds);
Chris Bieneman9062ab92016-05-12 16:04:16 +000081 IO.mapRequired("flags", FileHdr.flags);
Chris Bienemanfc889272016-05-12 18:21:09 +000082 IO.mapOptional("reserved", FileHdr.reserved,
83 static_cast<llvm::yaml::Hex32>(0xDEADBEEFu));
Chris Bieneman9062ab92016-05-12 16:04:16 +000084}
85
86void MappingTraits<MachOYAML::Object>::mapping(IO &IO,
87 MachOYAML::Object &Object) {
88 // If the context isn't already set, tag the document as !mach-o.
89 // For Fat files there will be a different tag so they can be differentiated.
Chris Bieneman24f07472016-05-12 17:44:43 +000090 if (!IO.getContext()) {
Chris Bieneman9062ab92016-05-12 16:04:16 +000091 IO.setContext(&Object);
92 IO.mapTag("!mach-o", true);
93 }
94 IO.mapRequired("FileHeader", Object.Header);
Chris Bieneman8b5906e2016-05-13 17:41:41 +000095 IO.mapOptional("LoadCommands", Object.LoadCommands);
Chris Bienemane8e75552016-05-25 17:09:07 +000096 IO.mapOptional("LinkEditData", Object.LinkEdit);
Chris Bieneman9062ab92016-05-12 16:04:16 +000097 IO.setContext(nullptr);
98}
99
Chris Bieneman524243d2016-05-26 20:06:14 +0000100void MappingTraits<MachOYAML::LinkEditData>::mapping(
101 IO &IO, MachOYAML::LinkEditData &LinkEditData) {
Chris Bienemane8e75552016-05-25 17:09:07 +0000102 IO.mapOptional("RebaseOpcodes", LinkEditData.RebaseOpcodes);
Chris Bieneman524243d2016-05-26 20:06:14 +0000103 IO.mapOptional("BindOpcodes", LinkEditData.BindOpcodes);
Chris Bienemane8e75552016-05-25 17:09:07 +0000104}
105
Chris Bieneman524243d2016-05-26 20:06:14 +0000106void MappingTraits<MachOYAML::RebaseOpcode>::mapping(
107 IO &IO, MachOYAML::RebaseOpcode &RebaseOpcode) {
Chris Bienemane8e75552016-05-25 17:09:07 +0000108 IO.mapRequired("Opcode", RebaseOpcode.Opcode);
109 IO.mapRequired("Imm", RebaseOpcode.Imm);
110 IO.mapOptional("ExtraData", RebaseOpcode.ExtraData);
111}
112
Chris Bieneman524243d2016-05-26 20:06:14 +0000113void MappingTraits<MachOYAML::BindOpcode>::mapping(
114 IO &IO, MachOYAML::BindOpcode &BindOpcode) {
115 IO.mapRequired("Opcode", BindOpcode.Opcode);
116 IO.mapRequired("Imm", BindOpcode.Imm);
117 IO.mapOptional("ULEBExtraData", BindOpcode.ULEBExtraData);
118 IO.mapOptional("SLEBExtraData", BindOpcode.SLEBExtraData);
119 IO.mapOptional("Symbol", BindOpcode.Symbol);
120}
121
Chris Bieneman9f243e92016-05-19 20:54:43 +0000122template <typename StructType>
123void mapLoadCommandData(IO &IO, MachOYAML::LoadCommand &LoadCommand) {}
124
125template <>
126void mapLoadCommandData<MachO::segment_command>(
127 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
128 IO.mapOptional("Sections", LoadCommand.Sections);
129}
130
131template <>
132void mapLoadCommandData<MachO::segment_command_64>(
133 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
134 IO.mapOptional("Sections", LoadCommand.Sections);
135}
136
137template <>
138void mapLoadCommandData<MachO::dylib_command>(
139 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
140 IO.mapOptional("PayloadString", LoadCommand.PayloadString);
141}
142
143template <>
144void mapLoadCommandData<MachO::dylinker_command>(
145 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
146 IO.mapOptional("PayloadString", LoadCommand.PayloadString);
147}
148
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000149void MappingTraits<MachOYAML::LoadCommand>::mapping(
150 IO &IO, MachOYAML::LoadCommand &LoadCommand) {
151 IO.mapRequired(
152 "cmd", (MachO::LoadCommandType &)LoadCommand.Data.load_command_data.cmd);
153 IO.mapRequired("cmdsize", LoadCommand.Data.load_command_data.cmdsize);
154
155#define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \
156 case MachO::LCName: \
157 MappingTraits<MachO::LCStruct>::mapping(IO, \
158 LoadCommand.Data.LCStruct##_data); \
Chris Bieneman9f243e92016-05-19 20:54:43 +0000159 mapLoadCommandData<MachO::LCStruct>(IO, LoadCommand); \
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000160 break;
161
162 switch (LoadCommand.Data.load_command_data.cmd) {
163#include "llvm/Support/MachO.def"
164 }
Chris Bieneman9f243e92016-05-19 20:54:43 +0000165 IO.mapOptional("PayloadBytes", LoadCommand.PayloadBytes);
166 IO.mapOptional("ZeroPadBytes", LoadCommand.ZeroPadBytes, (uint64_t)0ull);
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000167}
168
169void MappingTraits<MachO::dyld_info_command>::mapping(
170 IO &IO, MachO::dyld_info_command &LoadCommand) {
171 IO.mapRequired("rebase_off", LoadCommand.rebase_off);
172 IO.mapRequired("rebase_size", LoadCommand.rebase_size);
Chris Bieneman2de17d42016-05-18 16:17:23 +0000173 IO.mapRequired("bind_off", LoadCommand.bind_off);
174 IO.mapRequired("bind_size", LoadCommand.bind_size);
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000175 IO.mapRequired("weak_bind_off", LoadCommand.weak_bind_off);
176 IO.mapRequired("weak_bind_size", LoadCommand.weak_bind_size);
Chris Bieneman2de17d42016-05-18 16:17:23 +0000177 IO.mapRequired("lazy_bind_off", LoadCommand.lazy_bind_off);
178 IO.mapRequired("lazy_bind_size", LoadCommand.lazy_bind_size);
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000179 IO.mapRequired("export_off", LoadCommand.export_off);
180 IO.mapRequired("export_size", LoadCommand.export_size);
181}
182
Chris Bieneman2de17d42016-05-18 16:17:23 +0000183void MappingTraits<MachOYAML::Section>::mapping(IO &IO,
184 MachOYAML::Section &Section) {
185 IO.mapRequired("sectname", Section.sectname);
186 IO.mapRequired("segname", Section.segname);
187 IO.mapRequired("addr", Section.addr);
188 IO.mapRequired("size", Section.size);
189 IO.mapRequired("offset", Section.offset);
190 IO.mapRequired("align", Section.align);
191 IO.mapRequired("reloff", Section.reloff);
192 IO.mapRequired("nreloc", Section.nreloc);
193 IO.mapRequired("flags", Section.flags);
194 IO.mapRequired("reserved1", Section.reserved1);
195 IO.mapRequired("reserved2", Section.reserved2);
196 IO.mapOptional("reserved3", Section.reserved3);
197}
198
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000199void MappingTraits<MachO::dylib>::mapping(IO &IO, MachO::dylib &DylibStruct) {
200 IO.mapRequired("name", DylibStruct.name);
201 IO.mapRequired("timestamp", DylibStruct.timestamp);
202 IO.mapRequired("current_version", DylibStruct.current_version);
203 IO.mapRequired("compatibility_version", DylibStruct.compatibility_version);
204}
205
206void MappingTraits<MachO::dylib_command>::mapping(
207 IO &IO, MachO::dylib_command &LoadCommand) {
208 IO.mapRequired("dylib", LoadCommand.dylib);
209}
210
211void MappingTraits<MachO::dylinker_command>::mapping(
212 IO &IO, MachO::dylinker_command &LoadCommand) {
213
214 IO.mapRequired("name", LoadCommand.name);
215}
216
217void MappingTraits<MachO::dysymtab_command>::mapping(
218 IO &IO, MachO::dysymtab_command &LoadCommand) {
219
220 IO.mapRequired("ilocalsym", LoadCommand.ilocalsym);
221 IO.mapRequired("nlocalsym", LoadCommand.nlocalsym);
222 IO.mapRequired("iextdefsym", LoadCommand.iextdefsym);
223 IO.mapRequired("nextdefsym", LoadCommand.nextdefsym);
224 IO.mapRequired("iundefsym", LoadCommand.iundefsym);
225 IO.mapRequired("nundefsym", LoadCommand.nundefsym);
226 IO.mapRequired("tocoff", LoadCommand.tocoff);
227 IO.mapRequired("ntoc", LoadCommand.ntoc);
228 IO.mapRequired("modtaboff", LoadCommand.modtaboff);
229 IO.mapRequired("nmodtab", LoadCommand.nmodtab);
230 IO.mapRequired("extrefsymoff", LoadCommand.extrefsymoff);
231 IO.mapRequired("nextrefsyms", LoadCommand.nextrefsyms);
232 IO.mapRequired("indirectsymoff", LoadCommand.indirectsymoff);
233 IO.mapRequired("nindirectsyms", LoadCommand.nindirectsyms);
234 IO.mapRequired("extreloff", LoadCommand.extreloff);
235 IO.mapRequired("nextrel", LoadCommand.nextrel);
236 IO.mapRequired("locreloff", LoadCommand.locreloff);
237 IO.mapRequired("nlocrel", LoadCommand.nlocrel);
238}
239
240void MappingTraits<MachO::encryption_info_command>::mapping(
241 IO &IO, MachO::encryption_info_command &LoadCommand) {
242
243 IO.mapRequired("cryptoff", LoadCommand.cryptoff);
244 IO.mapRequired("cryptsize", LoadCommand.cryptsize);
245 IO.mapRequired("cryptid", LoadCommand.cryptid);
246}
247
248void MappingTraits<MachO::encryption_info_command_64>::mapping(
249 IO &IO, MachO::encryption_info_command_64 &LoadCommand) {
250
251 IO.mapRequired("cryptoff", LoadCommand.cryptoff);
252 IO.mapRequired("cryptsize", LoadCommand.cryptsize);
253 IO.mapRequired("cryptid", LoadCommand.cryptid);
254 IO.mapRequired("pad", LoadCommand.pad);
255}
256
257void MappingTraits<MachO::entry_point_command>::mapping(
258 IO &IO, MachO::entry_point_command &LoadCommand) {
259
260 IO.mapRequired("entryoff", LoadCommand.entryoff);
261 IO.mapRequired("stacksize", LoadCommand.stacksize);
262}
263
264void MappingTraits<MachO::fvmfile_command>::mapping(
265 IO &IO, MachO::fvmfile_command &LoadCommand) {
266
267 IO.mapRequired("name", LoadCommand.name);
268 IO.mapRequired("header_addr", LoadCommand.header_addr);
269}
270
271void MappingTraits<MachO::fvmlib>::mapping(IO &IO, MachO::fvmlib &FVMLib) {
272 IO.mapRequired("name", FVMLib.name);
273 IO.mapRequired("minor_version", FVMLib.minor_version);
274 IO.mapRequired("header_addr", FVMLib.header_addr);
275}
276
277void MappingTraits<MachO::fvmlib_command>::mapping(
278 IO &IO, MachO::fvmlib_command &LoadCommand) {
279
280 IO.mapRequired("fvmlib", LoadCommand.fvmlib);
281}
282
283void MappingTraits<MachO::ident_command>::mapping(
284 IO &IO, MachO::ident_command &LoadCommand) {}
285
286void MappingTraits<MachO::linkedit_data_command>::mapping(
287 IO &IO, MachO::linkedit_data_command &LoadCommand) {
288
289 IO.mapRequired("dataoff", LoadCommand.dataoff);
290 IO.mapRequired("datasize", LoadCommand.datasize);
291}
292
293void MappingTraits<MachO::linker_option_command>::mapping(
294 IO &IO, MachO::linker_option_command &LoadCommand) {
295
296 IO.mapRequired("count", LoadCommand.count);
297}
298
299void MappingTraits<MachO::prebind_cksum_command>::mapping(
300 IO &IO, MachO::prebind_cksum_command &LoadCommand) {
301
302 IO.mapRequired("cksum", LoadCommand.cksum);
303}
304
305void MappingTraits<MachO::load_command>::mapping(
306 IO &IO, MachO::load_command &LoadCommand) {}
307
308void MappingTraits<MachO::prebound_dylib_command>::mapping(
309 IO &IO, MachO::prebound_dylib_command &LoadCommand) {
310
311 IO.mapRequired("name", LoadCommand.name);
312 IO.mapRequired("nmodules", LoadCommand.nmodules);
313 IO.mapRequired("linked_modules", LoadCommand.linked_modules);
314}
315
316void MappingTraits<MachO::routines_command>::mapping(
317 IO &IO, MachO::routines_command &LoadCommand) {
318
319 IO.mapRequired("init_address", LoadCommand.init_address);
320 IO.mapRequired("init_module", LoadCommand.init_module);
321 IO.mapRequired("reserved1", LoadCommand.reserved1);
322 IO.mapRequired("reserved2", LoadCommand.reserved2);
323 IO.mapRequired("reserved3", LoadCommand.reserved3);
324 IO.mapRequired("reserved4", LoadCommand.reserved4);
325 IO.mapRequired("reserved5", LoadCommand.reserved5);
326 IO.mapRequired("reserved6", LoadCommand.reserved6);
327}
328
329void MappingTraits<MachO::routines_command_64>::mapping(
330 IO &IO, MachO::routines_command_64 &LoadCommand) {
331
332 IO.mapRequired("init_address", LoadCommand.init_address);
333 IO.mapRequired("init_module", LoadCommand.init_module);
334 IO.mapRequired("reserved1", LoadCommand.reserved1);
335 IO.mapRequired("reserved2", LoadCommand.reserved2);
336 IO.mapRequired("reserved3", LoadCommand.reserved3);
337 IO.mapRequired("reserved4", LoadCommand.reserved4);
338 IO.mapRequired("reserved5", LoadCommand.reserved5);
339 IO.mapRequired("reserved6", LoadCommand.reserved6);
340}
341
342void MappingTraits<MachO::rpath_command>::mapping(
343 IO &IO, MachO::rpath_command &LoadCommand) {
344
345 IO.mapRequired("path", LoadCommand.path);
346}
347
348void MappingTraits<MachO::section>::mapping(IO &IO, MachO::section &Section) {
349 IO.mapRequired("sectname", Section.sectname);
350 IO.mapRequired("segname", Section.segname);
351 IO.mapRequired("addr", Section.addr);
352 IO.mapRequired("size", Section.size);
353 IO.mapRequired("offset", Section.offset);
354 IO.mapRequired("align", Section.align);
355 IO.mapRequired("reloff", Section.reloff);
356 IO.mapRequired("nreloc", Section.nreloc);
357 IO.mapRequired("flags", Section.flags);
358 IO.mapRequired("reserved1", Section.reserved1);
359 IO.mapRequired("reserved2", Section.reserved2);
360}
361
362void MappingTraits<MachO::section_64>::mapping(IO &IO,
363 MachO::section_64 &Section) {
364 IO.mapRequired("sectname", Section.sectname);
365 IO.mapRequired("segname", Section.segname);
366 IO.mapRequired("addr", Section.addr);
367 IO.mapRequired("size", Section.size);
368 IO.mapRequired("offset", Section.offset);
369 IO.mapRequired("align", Section.align);
370 IO.mapRequired("reloff", Section.reloff);
371 IO.mapRequired("nreloc", Section.nreloc);
372 IO.mapRequired("flags", Section.flags);
373 IO.mapRequired("reserved1", Section.reserved1);
374 IO.mapRequired("reserved2", Section.reserved2);
375 IO.mapRequired("reserved3", Section.reserved3);
376}
377
378void MappingTraits<MachO::segment_command>::mapping(
379 IO &IO, MachO::segment_command &LoadCommand) {
380
381 IO.mapRequired("segname", LoadCommand.segname);
382 IO.mapRequired("vmaddr", LoadCommand.vmaddr);
383 IO.mapRequired("vmsize", LoadCommand.vmsize);
384 IO.mapRequired("fileoff", LoadCommand.fileoff);
385 IO.mapRequired("filesize", LoadCommand.filesize);
386 IO.mapRequired("maxprot", LoadCommand.maxprot);
387 IO.mapRequired("initprot", LoadCommand.initprot);
388 IO.mapRequired("nsects", LoadCommand.nsects);
389 IO.mapRequired("flags", LoadCommand.flags);
390}
391
392void MappingTraits<MachO::segment_command_64>::mapping(
393 IO &IO, MachO::segment_command_64 &LoadCommand) {
394
395 IO.mapRequired("segname", LoadCommand.segname);
396 IO.mapRequired("vmaddr", LoadCommand.vmaddr);
397 IO.mapRequired("vmsize", LoadCommand.vmsize);
398 IO.mapRequired("fileoff", LoadCommand.fileoff);
399 IO.mapRequired("filesize", LoadCommand.filesize);
400 IO.mapRequired("maxprot", LoadCommand.maxprot);
401 IO.mapRequired("initprot", LoadCommand.initprot);
402 IO.mapRequired("nsects", LoadCommand.nsects);
403 IO.mapRequired("flags", LoadCommand.flags);
404}
405
406void MappingTraits<MachO::source_version_command>::mapping(
407 IO &IO, MachO::source_version_command &LoadCommand) {
408
409 IO.mapRequired("version", LoadCommand.version);
410}
411
412void MappingTraits<MachO::sub_client_command>::mapping(
413 IO &IO, MachO::sub_client_command &LoadCommand) {
414
415 IO.mapRequired("client", LoadCommand.client);
416}
417
418void MappingTraits<MachO::sub_framework_command>::mapping(
419 IO &IO, MachO::sub_framework_command &LoadCommand) {
420
421 IO.mapRequired("umbrella", LoadCommand.umbrella);
422}
423
424void MappingTraits<MachO::sub_library_command>::mapping(
425 IO &IO, MachO::sub_library_command &LoadCommand) {
426
427 IO.mapRequired("sub_library", LoadCommand.sub_library);
428}
429
430void MappingTraits<MachO::sub_umbrella_command>::mapping(
431 IO &IO, MachO::sub_umbrella_command &LoadCommand) {
432
433 IO.mapRequired("sub_umbrella", LoadCommand.sub_umbrella);
434}
435
436void MappingTraits<MachO::symseg_command>::mapping(
437 IO &IO, MachO::symseg_command &LoadCommand) {
438
439 IO.mapRequired("offset", LoadCommand.offset);
440 IO.mapRequired("size", LoadCommand.size);
441}
442
443void MappingTraits<MachO::symtab_command>::mapping(
444 IO &IO, MachO::symtab_command &LoadCommand) {
445
446 IO.mapRequired("symoff", LoadCommand.symoff);
447 IO.mapRequired("nsyms", LoadCommand.nsyms);
448 IO.mapRequired("stroff", LoadCommand.stroff);
449 IO.mapRequired("strsize", LoadCommand.strsize);
450}
451
452void MappingTraits<MachO::thread_command>::mapping(
453 IO &IO, MachO::thread_command &LoadCommand) {}
454
455void MappingTraits<MachO::twolevel_hints_command>::mapping(
456 IO &IO, MachO::twolevel_hints_command &LoadCommand) {
457
458 IO.mapRequired("offset", LoadCommand.offset);
459 IO.mapRequired("nhints", LoadCommand.nhints);
460}
461
462void MappingTraits<MachO::uuid_command>::mapping(
463 IO &IO, MachO::uuid_command &LoadCommand) {
464
Chris Bieneman3f2eb832016-05-17 19:44:06 +0000465 IO.mapRequired("uuid", LoadCommand.uuid);
466}
467
468void MappingTraits<MachO::version_min_command>::mapping(
469 IO &IO, MachO::version_min_command &LoadCommand) {
470
471 IO.mapRequired("version", LoadCommand.version);
472 IO.mapRequired("sdk", LoadCommand.sdk);
Chris Bieneman8b5906e2016-05-13 17:41:41 +0000473}
474
Chris Bieneman9062ab92016-05-12 16:04:16 +0000475} // namespace llvm::yaml
476
477} // namespace llvm