llvm.org GIT mirror llvm / 457c8eb
Fix dubious type name similar to member name. Should bring bots back to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183715 91177308-0d34-0410-b5e6-96231b3b80d8 Sean Silva 7 years ago
8 changed file(s) with 17 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
3838
3939 // For now, hardcode 64 bits everywhere that 32 or 64 would be needed
4040 // since 64-bit can hold 32-bit values too.
41 struct Header {
41 struct FileHeader {
4242 ELF_ELFCLASS Class;
4343 ELF_ELFDATA Data;
4444 ELF_ET Type;
4646 llvm::yaml::Hex64 Entry;
4747 };
4848 struct Object {
49 Header Header;
49 FileHeader Header;
5050 };
5151
5252 } // end namespace ELFYAML
7676 };
7777
7878 template <>
79 struct MappingTraits {
80 static void mapping(IO &IO, ELFYAML::Header &Header);
79 struct MappingTraits {
80 static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr);
8181 };
8282
8383 template <>
211211 #undef ECase
212212 }
213213
214 void MappingTraits::mapping(IO &IO, ELFYAML::Header &Header) {
215 IO.mapRequired("Class", Header.Class);
216 IO.mapRequired("Data", Header.Data);
217 IO.mapRequired("Type", Header.Type);
218 IO.mapRequired("Machine", Header.Machine);
219 IO.mapOptional("Entry", Header.Entry, Hex64(0));
214 void MappingTraits::mapping(IO &IO, ELFYAML::FileHeader &FileHdr) {
215 IO.mapRequired("Class", FileHdr.Class);
216 IO.mapRequired("Data", FileHdr.Data);
217 IO.mapRequired("Type", FileHdr.Type);
218 IO.mapRequired("Machine", FileHdr.Machine);
219 IO.mapOptional("Entry", FileHdr.Entry, Hex64(0));
220220 }
221221
222222 void MappingTraits::mapping(IO &IO, ELFYAML::Object &Object) {
223 IO.mapRequired("Header", Object.Header);
223 IO.mapRequired("FileHeader", Object.Header);
224224 }
225225
226226 } // end namespace yaml
0 !ELF
1 Header: !Header
1 FileHeader: !FileHeader
22 Class: ELFCLASS32
33 Data: ELFDATA2MSB
44 Type: ET_EXEC
0 !ELF
1 Header: !Header
1 FileHeader: !FileHeader
22 Class: ELFCLASS64
33 Data: ELFDATA2MSB
44 Type: ET_EXEC
0 !ELF
1 Header: !Header
1 FileHeader: !FileHeader
22 Class: ELFCLASS64
33 Data: ELFDATA2LSB
44 Type: ET_EXEC
0 !ELF
1 Header: !Header
1 FileHeader: !FileHeader
22 Class: ELFCLASS32
33 Data: ELFDATA2LSB
44 Type: ET_EXEC
0 !ELF
1 Header: !Header
1 FileHeader: !FileHeader
22 Class: ELFCLASS64
33 Data: ELFDATA2LSB
44 Type: ET_EXEC
2323
2424 template
2525 static void writeELF(raw_ostream &OS, const ELFYAML::Object &Doc) {
26 const ELFYAML::Header &Hdr = Doc.Header;
26 const ELFYAML::FileHeader &Hdr = Doc.Header;
2727 using namespace llvm::ELF;
2828 using namespace llvm::object;
2929 typename ELFObjectFile::Elf_Ehdr Header;