diff options
author | Sean Silva <silvas@purdue.edu> | 2013-06-11 00:13:52 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2013-06-11 00:13:52 +0000 |
commit | 457c8ebfd070eb7ee840ec97142f975974cfc834 (patch) | |
tree | 54184817e7197b1d96caeaaf79f92d545980910e | |
parent | 981aec814c4e0b44636547422dab5955e4065077 (diff) | |
download | external_llvm-457c8ebfd070eb7ee840ec97142f975974cfc834.zip external_llvm-457c8ebfd070eb7ee840ec97142f975974cfc834.tar.gz external_llvm-457c8ebfd070eb7ee840ec97142f975974cfc834.tar.bz2 |
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
-rw-r--r-- | include/llvm/Object/ELFYAML.h | 8 | ||||
-rw-r--r-- | lib/Object/ELFYAML.cpp | 14 | ||||
-rw-r--r-- | test/Object/Inputs/ELF/BE32.yaml | 2 | ||||
-rw-r--r-- | test/Object/Inputs/ELF/BE64.yaml | 2 | ||||
-rw-r--r-- | test/Object/Inputs/ELF/Header.yaml | 2 | ||||
-rw-r--r-- | test/Object/Inputs/ELF/LE32.yaml | 2 | ||||
-rw-r--r-- | test/Object/Inputs/ELF/LE64.yaml | 2 | ||||
-rw-r--r-- | tools/yaml2obj/yaml2elf.cpp | 2 |
8 files changed, 17 insertions, 17 deletions
diff --git a/include/llvm/Object/ELFYAML.h b/include/llvm/Object/ELFYAML.h index d0067ca..029a8ab 100644 --- a/include/llvm/Object/ELFYAML.h +++ b/include/llvm/Object/ELFYAML.h @@ -39,7 +39,7 @@ LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFDATA) // For now, hardcode 64 bits everywhere that 32 or 64 would be needed // since 64-bit can hold 32-bit values too. -struct Header { +struct FileHeader { ELF_ELFCLASS Class; ELF_ELFDATA Data; ELF_ET Type; @@ -47,7 +47,7 @@ struct Header { llvm::yaml::Hex64 Entry; }; struct Object { - Header Header; + FileHeader Header; }; } // end namespace ELFYAML @@ -77,8 +77,8 @@ struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> { }; template <> -struct MappingTraits<ELFYAML::Header> { - static void mapping(IO &IO, ELFYAML::Header &Header); +struct MappingTraits<ELFYAML::FileHeader> { + static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr); }; template <> diff --git a/lib/Object/ELFYAML.cpp b/lib/Object/ELFYAML.cpp index c4f3fc1..fcd4091 100644 --- a/lib/Object/ELFYAML.cpp +++ b/lib/Object/ELFYAML.cpp @@ -212,16 +212,16 @@ void ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA>::enumeration( #undef ECase } -void MappingTraits<ELFYAML::Header>::mapping(IO &IO, ELFYAML::Header &Header) { - IO.mapRequired("Class", Header.Class); - IO.mapRequired("Data", Header.Data); - IO.mapRequired("Type", Header.Type); - IO.mapRequired("Machine", Header.Machine); - IO.mapOptional("Entry", Header.Entry, Hex64(0)); +void MappingTraits<ELFYAML::FileHeader>::mapping(IO &IO, ELFYAML::FileHeader &FileHdr) { + IO.mapRequired("Class", FileHdr.Class); + IO.mapRequired("Data", FileHdr.Data); + IO.mapRequired("Type", FileHdr.Type); + IO.mapRequired("Machine", FileHdr.Machine); + IO.mapOptional("Entry", FileHdr.Entry, Hex64(0)); } void MappingTraits<ELFYAML::Object>::mapping(IO &IO, ELFYAML::Object &Object) { - IO.mapRequired("Header", Object.Header); + IO.mapRequired("FileHeader", Object.Header); } } // end namespace yaml diff --git a/test/Object/Inputs/ELF/BE32.yaml b/test/Object/Inputs/ELF/BE32.yaml index 3709ff7..2a18d6f 100644 --- a/test/Object/Inputs/ELF/BE32.yaml +++ b/test/Object/Inputs/ELF/BE32.yaml @@ -1,5 +1,5 @@ !ELF -Header: !Header +FileHeader: !FileHeader Class: ELFCLASS32 Data: ELFDATA2MSB Type: ET_EXEC diff --git a/test/Object/Inputs/ELF/BE64.yaml b/test/Object/Inputs/ELF/BE64.yaml index d1c4401..091793f 100644 --- a/test/Object/Inputs/ELF/BE64.yaml +++ b/test/Object/Inputs/ELF/BE64.yaml @@ -1,5 +1,5 @@ !ELF -Header: !Header +FileHeader: !FileHeader Class: ELFCLASS64 Data: ELFDATA2MSB Type: ET_EXEC diff --git a/test/Object/Inputs/ELF/Header.yaml b/test/Object/Inputs/ELF/Header.yaml index 085b120..39f9814 100644 --- a/test/Object/Inputs/ELF/Header.yaml +++ b/test/Object/Inputs/ELF/Header.yaml @@ -1,5 +1,5 @@ !ELF -Header: !Header +FileHeader: !FileHeader Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC diff --git a/test/Object/Inputs/ELF/LE32.yaml b/test/Object/Inputs/ELF/LE32.yaml index a4f30fb..021fb0d 100644 --- a/test/Object/Inputs/ELF/LE32.yaml +++ b/test/Object/Inputs/ELF/LE32.yaml @@ -1,5 +1,5 @@ !ELF -Header: !Header +FileHeader: !FileHeader Class: ELFCLASS32 Data: ELFDATA2LSB Type: ET_EXEC diff --git a/test/Object/Inputs/ELF/LE64.yaml b/test/Object/Inputs/ELF/LE64.yaml index cd0ca25..2fefc0b 100644 --- a/test/Object/Inputs/ELF/LE64.yaml +++ b/test/Object/Inputs/ELF/LE64.yaml @@ -1,5 +1,5 @@ !ELF -Header: !Header +FileHeader: !FileHeader Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index d595942..45ccb62 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp @@ -24,7 +24,7 @@ using namespace llvm; template <class ELFT> static void writeELF(raw_ostream &OS, const ELFYAML::Object &Doc) { - const ELFYAML::Header &Hdr = Doc.Header; + const ELFYAML::FileHeader &Hdr = Doc.Header; using namespace llvm::ELF; using namespace llvm::object; typename ELFObjectFile<ELFT>::Elf_Ehdr Header; |