[llvm] r183715 - Fix dubious type name similar to member name.
Sean Silva
silvas at purdue.edu
Mon Jun 10 17:13:53 PDT 2013
Author: silvas
Date: Mon Jun 10 19:13:52 2013
New Revision: 183715
URL: http://llvm.org/viewvc/llvm-project?rev=183715&view=rev
Log:
Fix dubious type name similar to member name.
Should bring bots back to life.
Modified:
llvm/trunk/include/llvm/Object/ELFYAML.h
llvm/trunk/lib/Object/ELFYAML.cpp
llvm/trunk/test/Object/Inputs/ELF/BE32.yaml
llvm/trunk/test/Object/Inputs/ELF/BE64.yaml
llvm/trunk/test/Object/Inputs/ELF/Header.yaml
llvm/trunk/test/Object/Inputs/ELF/LE32.yaml
llvm/trunk/test/Object/Inputs/ELF/LE64.yaml
llvm/trunk/tools/yaml2obj/yaml2elf.cpp
Modified: llvm/trunk/include/llvm/Object/ELFYAML.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFYAML.h?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFYAML.h (original)
+++ llvm/trunk/include/llvm/Object/ELFYAML.h Mon Jun 10 19:13:52 2013
@@ -39,7 +39,7 @@ LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_EL
// 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::
};
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 <>
Modified: llvm/trunk/lib/Object/ELFYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ELFYAML.cpp?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ELFYAML.cpp (original)
+++ llvm/trunk/lib/Object/ELFYAML.cpp Mon Jun 10 19:13:52 2013
@@ -212,16 +212,16 @@ void ScalarEnumerationTraits<ELFYAML::EL
#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
Modified: llvm/trunk/test/Object/Inputs/ELF/BE32.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/ELF/BE32.yaml?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/test/Object/Inputs/ELF/BE32.yaml (original)
+++ llvm/trunk/test/Object/Inputs/ELF/BE32.yaml Mon Jun 10 19:13:52 2013
@@ -1,5 +1,5 @@
!ELF
-Header: !Header
+FileHeader: !FileHeader
Class: ELFCLASS32
Data: ELFDATA2MSB
Type: ET_EXEC
Modified: llvm/trunk/test/Object/Inputs/ELF/BE64.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/ELF/BE64.yaml?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/test/Object/Inputs/ELF/BE64.yaml (original)
+++ llvm/trunk/test/Object/Inputs/ELF/BE64.yaml Mon Jun 10 19:13:52 2013
@@ -1,5 +1,5 @@
!ELF
-Header: !Header
+FileHeader: !FileHeader
Class: ELFCLASS64
Data: ELFDATA2MSB
Type: ET_EXEC
Modified: llvm/trunk/test/Object/Inputs/ELF/Header.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/ELF/Header.yaml?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/test/Object/Inputs/ELF/Header.yaml (original)
+++ llvm/trunk/test/Object/Inputs/ELF/Header.yaml Mon Jun 10 19:13:52 2013
@@ -1,5 +1,5 @@
!ELF
-Header: !Header
+FileHeader: !FileHeader
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Modified: llvm/trunk/test/Object/Inputs/ELF/LE32.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/ELF/LE32.yaml?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/test/Object/Inputs/ELF/LE32.yaml (original)
+++ llvm/trunk/test/Object/Inputs/ELF/LE32.yaml Mon Jun 10 19:13:52 2013
@@ -1,5 +1,5 @@
!ELF
-Header: !Header
+FileHeader: !FileHeader
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_EXEC
Modified: llvm/trunk/test/Object/Inputs/ELF/LE64.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Inputs/ELF/LE64.yaml?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/test/Object/Inputs/ELF/LE64.yaml (original)
+++ llvm/trunk/test/Object/Inputs/ELF/LE64.yaml Mon Jun 10 19:13:52 2013
@@ -1,5 +1,5 @@
!ELF
-Header: !Header
+FileHeader: !FileHeader
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Modified: llvm/trunk/tools/yaml2obj/yaml2elf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2elf.cpp?rev=183715&r1=183714&r2=183715&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2elf.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp Mon Jun 10 19:13:52 2013
@@ -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;
More information about the llvm-commits
mailing list