diff --git a/llvm/include/llvm/ObjectYAML/ELFYAML.h b/llvm/include/llvm/ObjectYAML/ELFYAML.h --- a/llvm/include/llvm/ObjectYAML/ELFYAML.h +++ b/llvm/include/llvm/ObjectYAML/ELFYAML.h @@ -444,13 +444,13 @@ static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Verdef; } }; -struct Group : Section { +struct GroupSection : Section { // Members of a group contain a flag and a list of section indices // that are part of the group. std::vector Members; Optional Signature; /* Info */ - Group() : Section(ChunkKind::Group) {} + GroupSection() : Section(ChunkKind::Group) {} static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Group; } }; diff --git a/llvm/lib/ObjectYAML/ELFEmitter.cpp b/llvm/lib/ObjectYAML/ELFEmitter.cpp --- a/llvm/lib/ObjectYAML/ELFEmitter.cpp +++ b/llvm/lib/ObjectYAML/ELFEmitter.cpp @@ -245,7 +245,8 @@ void writeSectionContent(Elf_Shdr &SHeader, const ELFYAML::RelrSection &Section, ContiguousBlobAccumulator &CBA); - void writeSectionContent(Elf_Shdr &SHeader, const ELFYAML::Group &Group, + void writeSectionContent(Elf_Shdr &SHeader, + const ELFYAML::GroupSection &Group, ContiguousBlobAccumulator &CBA); void writeSectionContent(Elf_Shdr &SHeader, const ELFYAML::SymtabShndxSection &Shndx, @@ -697,7 +698,7 @@ writeSectionContent(SHeader, *S, CBA); } else if (auto S = dyn_cast(Sec)) { writeSectionContent(SHeader, *S, CBA); - } else if (auto S = dyn_cast(Sec)) { + } else if (auto S = dyn_cast(Sec)) { writeSectionContent(SHeader, *S, CBA); } else if (auto S = dyn_cast(Sec)) { writeSectionContent(SHeader, *S, CBA); @@ -1237,7 +1238,7 @@ template void ELFState::writeSectionContent(Elf_Shdr &SHeader, - const ELFYAML::Group &Section, + const ELFYAML::GroupSection &Section, ContiguousBlobAccumulator &CBA) { assert(Section.Type == llvm::ELF::SHT_GROUP && "Section type is not SHT_GROUP"); diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp --- a/llvm/lib/ObjectYAML/ELFYAML.cpp +++ b/llvm/lib/ObjectYAML/ELFYAML.cpp @@ -1214,7 +1214,7 @@ IO.mapOptional("Content", Section.Content); } -static void groupSectionMapping(IO &IO, ELFYAML::Group &Group) { +static void groupSectionMapping(IO &IO, ELFYAML::GroupSection &Group) { commonSectionMapping(IO, Group); IO.mapOptional("Info", Group.Signature); IO.mapRequired("Members", Group.Members); @@ -1353,8 +1353,8 @@ break; case ELF::SHT_GROUP: if (!IO.outputting()) - Section.reset(new ELFYAML::Group()); - groupSectionMapping(IO, *cast(Section.get())); + Section.reset(new ELFYAML::GroupSection()); + groupSectionMapping(IO, *cast(Section.get())); break; case ELF::SHT_NOBITS: if (!IO.outputting()) diff --git a/llvm/tools/obj2yaml/elf2yaml.cpp b/llvm/tools/obj2yaml/elf2yaml.cpp --- a/llvm/tools/obj2yaml/elf2yaml.cpp +++ b/llvm/tools/obj2yaml/elf2yaml.cpp @@ -94,7 +94,7 @@ Expected dumpVerdefSection(const Elf_Shdr *Shdr); Expected dumpSymverSection(const Elf_Shdr *Shdr); Expected dumpVerneedSection(const Elf_Shdr *Shdr); - Expected dumpGroup(const Elf_Shdr *Shdr); + Expected dumpGroupSection(const Elf_Shdr *Shdr); Expected dumpARMIndexTableSection(const Elf_Shdr *Shdr); Expected dumpMipsABIFlags(const Elf_Shdr *Shdr); @@ -480,7 +480,7 @@ case ELF::SHT_RELR: return [this](const Elf_Shdr *S) { return dumpRelrSection(S); }; case ELF::SHT_GROUP: - return [this](const Elf_Shdr *S) { return dumpGroup(S); }; + return [this](const Elf_Shdr *S) { return dumpGroupSection(S); }; case ELF::SHT_NOBITS: return [this](const Elf_Shdr *S) { return dumpNoBitsSection(S); }; case ELF::SHT_NOTE: @@ -1323,8 +1323,9 @@ } template -Expected ELFDumper::dumpGroup(const Elf_Shdr *Shdr) { - auto S = std::make_unique(); +Expected +ELFDumper::dumpGroupSection(const Elf_Shdr *Shdr) { + auto S = std::make_unique(); if (Error E = dumpCommonSection(Shdr, *S)) return std::move(E);