[lld] r276165 - Function names should start with lowercase letters.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 12:36:41 PDT 2016
Author: ruiu
Date: Wed Jul 20 14:36:41 2016
New Revision: 276165
URL: http://llvm.org/viewvc/llvm-project?rev=276165&view=rev
Log:
Function names should start with lowercase letters.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/Writer.cpp
lld/trunk/ELF/Writer.h
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=276165&r1=276164&r2=276165&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Wed Jul 20 14:36:41 2016
@@ -330,19 +330,19 @@ LinkerScript<ELFT>::createPhdrs(ArrayRef
Phdr &Added = Phdrs.back();
if (Cmd.HasFilehdr)
- Added.AddSec(Out<ELFT>::ElfHeader);
+ Added.add(Out<ELFT>::ElfHeader);
if (Cmd.HasPhdrs)
- Added.AddSec(Out<ELFT>::ProgramHeaders);
+ Added.add(Out<ELFT>::ProgramHeaders);
switch (Cmd.Type) {
case PT_INTERP:
if (needsInterpSection<ELFT>())
- Added.AddSec(Out<ELFT>::Interp);
+ Added.add(Out<ELFT>::Interp);
break;
case PT_DYNAMIC:
if (isOutputDynamic<ELFT>()) {
Added.H.p_flags = toPhdrFlags(Out<ELFT>::Dynamic->getFlags());
- Added.AddSec(Out<ELFT>::Dynamic);
+ Added.add(Out<ELFT>::Dynamic);
}
break;
case PT_TLS:
@@ -357,7 +357,7 @@ LinkerScript<ELFT>::createPhdrs(ArrayRef
case PT_GNU_EH_FRAME:
if (!Out<ELFT>::EhFrame->empty() && Out<ELFT>::EhFrameHdr) {
Added.H.p_flags = toPhdrFlags(Out<ELFT>::EhFrameHdr->getFlags());
- Added.AddSec(Out<ELFT>::EhFrameHdr);
+ Added.add(Out<ELFT>::EhFrameHdr);
}
break;
}
@@ -368,7 +368,7 @@ LinkerScript<ELFT>::createPhdrs(ArrayRef
break;
if (TlsNum != -1 && (Sec->getFlags() & SHF_TLS))
- Phdrs[TlsNum].AddSec(Sec);
+ Phdrs[TlsNum].add(Sec);
if (!needsPtLoad<ELFT>(Sec))
continue;
@@ -378,7 +378,7 @@ LinkerScript<ELFT>::createPhdrs(ArrayRef
if (!PhdrIds.empty()) {
// Assign headers specified by linker script
for (size_t Id : PhdrIds) {
- Phdrs[Id].AddSec(Sec);
+ Phdrs[Id].add(Sec);
Phdrs[Id].H.p_flags |= toPhdrFlags(Sec->getFlags());
}
} else {
@@ -389,13 +389,13 @@ LinkerScript<ELFT>::createPhdrs(ArrayRef
Load = &*Phdrs.emplace(Phdrs.end(), PT_LOAD, NewFlags);
Flags = NewFlags;
}
- Load->AddSec(Sec);
+ Load->add(Sec);
}
if (RelroNum != -1 && isRelroSection(Sec))
- Phdrs[RelroNum].AddSec(Sec);
+ Phdrs[RelroNum].add(Sec);
if (NoteNum != -1 && Sec->getType() == SHT_NOTE)
- Phdrs[NoteNum].AddSec(Sec);
+ Phdrs[NoteNum].add(Sec);
}
return Phdrs;
}
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=276165&r1=276164&r2=276165&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Jul 20 14:36:41 2016
@@ -496,7 +496,7 @@ PhdrEntry<ELFT>::PhdrEntry(unsigned Type
}
template<class ELFT>
-void PhdrEntry<ELFT>::AddSec(OutputSectionBase<ELFT> *Sec) {
+void PhdrEntry<ELFT>::add(OutputSectionBase<ELFT> *Sec) {
Last = Sec;
if (!First)
First = Sec;
@@ -959,19 +959,19 @@ std::vector<PhdrEntry<ELFT>> Writer<ELFT
// The first phdr entry is PT_PHDR which describes the program header itself.
Phdr &Hdr = *AddHdr(PT_PHDR, PF_R);
- Hdr.AddSec(Out<ELFT>::ProgramHeaders);
+ Hdr.add(Out<ELFT>::ProgramHeaders);
// PT_INTERP must be the second entry if exists.
if (needsInterpSection<ELFT>()) {
Phdr &Hdr = *AddHdr(PT_INTERP, toPhdrFlags(Out<ELFT>::Interp->getFlags()));
- Hdr.AddSec(Out<ELFT>::Interp);
+ Hdr.add(Out<ELFT>::Interp);
}
// Add the first PT_LOAD segment for regular output sections.
uintX_t Flags = PF_R;
Phdr *Load = AddHdr(PT_LOAD, Flags);
- Load->AddSec(Out<ELFT>::ElfHeader);
- Load->AddSec(Out<ELFT>::ProgramHeaders);
+ Load->add(Out<ELFT>::ElfHeader);
+ Load->add(Out<ELFT>::ProgramHeaders);
Phdr TlsHdr(PT_TLS, PF_R);
Phdr RelRo(PT_GNU_RELRO, PF_R);
@@ -984,7 +984,7 @@ std::vector<PhdrEntry<ELFT>> Writer<ELFT
// and put all TLS sections inside for futher use when
// assign addresses.
if (Sec->getFlags() & SHF_TLS)
- TlsHdr.AddSec(Sec);
+ TlsHdr.add(Sec);
if (!needsPtLoad<ELFT>(Sec))
continue;
@@ -996,12 +996,12 @@ std::vector<PhdrEntry<ELFT>> Writer<ELFT
Flags = NewFlags;
}
- Load->AddSec(Sec);
+ Load->add(Sec);
if (isRelroSection(Sec))
- RelRo.AddSec(Sec);
+ RelRo.add(Sec);
if (Sec->getType() == SHT_NOTE)
- Note.AddSec(Sec);
+ Note.add(Sec);
}
// Add the TLS segment unless it's empty.
@@ -1011,7 +1011,7 @@ std::vector<PhdrEntry<ELFT>> Writer<ELFT
// Add an entry for .dynamic.
if (isOutputDynamic<ELFT>()) {
Phdr &H = *AddHdr(PT_DYNAMIC, toPhdrFlags(Out<ELFT>::Dynamic->getFlags()));
- H.AddSec(Out<ELFT>::Dynamic);
+ H.add(Out<ELFT>::Dynamic);
}
// PT_GNU_RELRO includes all sections that should be marked as
@@ -1023,7 +1023,7 @@ std::vector<PhdrEntry<ELFT>> Writer<ELFT
if (!Out<ELFT>::EhFrame->empty() && Out<ELFT>::EhFrameHdr) {
Phdr &Hdr = *AddHdr(PT_GNU_EH_FRAME,
toPhdrFlags(Out<ELFT>::EhFrameHdr->getFlags()));
- Hdr.AddSec(Out<ELFT>::EhFrameHdr);
+ Hdr.add(Out<ELFT>::EhFrameHdr);
}
// PT_GNU_STACK is a special section to tell the loader to make the
Modified: lld/trunk/ELF/Writer.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=276165&r1=276164&r2=276165&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.h (original)
+++ lld/trunk/ELF/Writer.h Wed Jul 20 14:36:41 2016
@@ -37,7 +37,7 @@ uint32_t toPhdrFlags(uint64_t Flags);
template<class ELFT>
struct PhdrEntry {
PhdrEntry(unsigned Type, unsigned Flags);
- void AddSec(OutputSectionBase<ELFT> *Sec);
+ void add(OutputSectionBase<ELFT> *Sec);
typename ELFT::Phdr H = {};
OutputSectionBase<ELFT> *First = nullptr;
More information about the llvm-commits
mailing list