From: George Rimar Date: Fri, 26 Apr 2019 12:20:51 +0000 (+0000) Subject: [yaml2obj] - Make the code to match the LLVM style. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c10ed4a91423699e6783f76bb7fc2dbf3fde1b60;p=llvm [yaml2obj] - Make the code to match the LLVM style. NFCI. This renames the variables to uppercase and removes use of `auto` for unobvious type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359298 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index 96761259c4e..a35a9805a2e 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp @@ -593,14 +593,14 @@ bool ELFState::writeSectionContent(Elf_Shdr &SHeader, raw_ostream &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); - for (auto member : Section.Members) { - unsigned int sectionIndex = 0; - if (member.sectionNameOrType == "GRP_COMDAT") - sectionIndex = llvm::ELF::GRP_COMDAT; - else if (!convertSectionIndex(SN2I, Section.Name, member.sectionNameOrType, - sectionIndex)) + for (const ELFYAML::SectionOrType &Member : Section.Members) { + unsigned int SectionIndex = 0; + if (Member.sectionNameOrType == "GRP_COMDAT") + SectionIndex = llvm::ELF::GRP_COMDAT; + else if (!convertSectionIndex(SN2I, Section.Name, Member.sectionNameOrType, + SectionIndex)) return false; - support::endian::write(OS, sectionIndex, ELFT::TargetEndianness); + support::endian::write(OS, SectionIndex, ELFT::TargetEndianness); } return true; }