[llvm] r359298 - [yaml2obj] - Make the code to match the LLVM style. NFCI.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 05:20:51 PDT 2019
Author: grimar
Date: Fri Apr 26 05:20:51 2019
New Revision: 359298
URL: http://llvm.org/viewvc/llvm-project?rev=359298&view=rev
Log:
[yaml2obj] - Make the code to match the LLVM style. NFCI.
This renames the variables to uppercase and
removes use of `auto` for unobvious type.
Modified:
llvm/trunk/tools/yaml2obj/yaml2elf.cpp
Modified: llvm/trunk/tools/yaml2obj/yaml2elf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2elf.cpp?rev=359298&r1=359297&r2=359298&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2elf.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp Fri Apr 26 05:20:51 2019
@@ -593,14 +593,14 @@ bool ELFState<ELFT>::writeSectionContent
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<uint32_t>(OS, sectionIndex, ELFT::TargetEndianness);
+ support::endian::write<uint32_t>(OS, SectionIndex, ELFT::TargetEndianness);
}
return true;
}
More information about the llvm-commits
mailing list