diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 43a92b04c2e6..9b7904352e80 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -53,10 +53,10 @@ public: typedef typename std::conditional::type HeaderT; - ProgramHeader(uintX_t p_type, uintX_t p_flags) { + ProgramHeader(uintX_t Type, uintX_t Flags) { std::memset(&Header, 0, sizeof(HeaderT)); - Header.p_type = p_type; - Header.p_flags = p_flags; + Header.p_type = Type; + Header.p_flags = Flags; Header.p_align = PageSize; } @@ -188,8 +188,8 @@ namespace { template struct SectionKey { typedef typename std::conditional::type uintX_t; StringRef Name; - uint32_t sh_type; - uintX_t sh_flags; + uint32_t Type; + uintX_t Flags; }; } namespace llvm { @@ -202,12 +202,12 @@ template struct DenseMapInfo> { 0}; } static unsigned getHashValue(const SectionKey &Val) { - return hash_combine(Val.Name, Val.sh_type, Val.sh_flags); + return hash_combine(Val.Name, Val.Type, Val.Flags); } static bool isEqual(const SectionKey &LHS, const SectionKey &RHS) { return DenseMapInfo::isEqual(LHS.Name, RHS.Name) && - LHS.sh_type == RHS.sh_type && LHS.sh_flags == RHS.sh_flags; + LHS.Type == RHS.Type && LHS.Flags == RHS.Flags; } }; } @@ -320,7 +320,7 @@ template void Writer::createSections() { OutputSection *&Sec = Map[Key]; if (!Sec) { Sec = new (CAlloc.Allocate()) OutputSection( - PltSec, GotSec, BssSec, Key.Name, Key.sh_type, Key.sh_flags); + PltSec, GotSec, BssSec, Key.Name, Key.Type, Key.Flags); OutputSections.push_back(Sec); } Sec->addSection(C);