[lld] r249991 - Rename phdr{Copy,Set} -> {set,copy}Phdr.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 12:45:59 PDT 2015
Author: ruiu
Date: Sun Oct 11 14:45:58 2015
New Revision: 249991
URL: http://llvm.org/viewvc/llvm-project?rev=249991&view=rev
Log:
Rename phdr{Copy,Set} -> {set,copy}Phdr.
They are functions, so they should be verbs.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=249991&r1=249990&r2=249991&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sun Oct 11 14:45:58 2015
@@ -73,9 +73,9 @@ private:
std::vector<OutputSectionBase<ELFT::Is64Bits> *> OutputSections;
unsigned getNumSections() const { return OutputSections.size() + 1; }
- void phdrSet(Elf_Phdr *PH, uint32_t Type, uint32_t Flags, uintX_t FileOff,
+ void setPhdr(Elf_Phdr *PH, uint32_t Type, uint32_t Flags, uintX_t FileOff,
uintX_t VA, uintX_t Align);
- void phdrCopy(Elf_Phdr *PH, OutputSectionBase<ELFT::Is64Bits> *From);
+ void copyPhdr(Elf_Phdr *PH, OutputSectionBase<ELFT::Is64Bits> *From);
SymbolTable<ELFT> &Symtab;
std::vector<Elf_Phdr> Phdrs;
@@ -481,7 +481,7 @@ template <class ELFT> void Writer<ELFT>:
// The first Phdr entry is PT_PHDR which describes the program header itself.
Phdrs.emplace_back();
Elf_Phdr *PhdrPhdr = &Phdrs.back();
- phdrSet(PhdrPhdr, PT_PHDR, PF_R, FileOff, VA, /*Align=*/8);
+ setPhdr(PhdrPhdr, PT_PHDR, PF_R, FileOff, VA, /*Align=*/8);
FileOff += sizeof(Elf_Phdr) * NumPhdrs;
VA += sizeof(Elf_Phdr) * NumPhdrs;
@@ -495,7 +495,7 @@ template <class ELFT> void Writer<ELFT>:
// Create a Phdr for the file header.
Phdrs.emplace_back();
Elf_Phdr *FileHeader = &Phdrs.back();
- phdrSet(FileHeader, PT_LOAD, PF_R, 0, getVAStart(), Target->getPageSize());
+ setPhdr(FileHeader, PT_LOAD, PF_R, 0, getVAStart(), Target->getPageSize());
SmallPtrSet<Elf_Phdr *, 8> Closed;
for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections) {
@@ -514,7 +514,7 @@ template <class ELFT> void Writer<ELFT>:
FileOff = RoundUpToAlignment(FileOff, Target->getPageSize());
Phdrs.emplace_back();
Elf_Phdr *PH = &Phdrs.back();
- phdrSet(PH, PT_LOAD, Flags, FileOff, VA, Target->getPageSize());
+ setPhdr(PH, PT_LOAD, Flags, FileOff, VA, Target->getPageSize());
}
}
}
@@ -534,13 +534,13 @@ template <class ELFT> void Writer<ELFT>:
if (Interp) {
Interp->p_type = PT_INTERP;
- phdrCopy(Interp, Out<ELFT>::Interp);
+ copyPhdr(Interp, Out<ELFT>::Interp);
}
if (needsDynamicSections()) {
Phdrs.emplace_back();
Elf_Phdr *PH = &Phdrs.back();
PH->p_type = PT_DYNAMIC;
- phdrCopy(PH, Out<ELFT>::Dynamic);
+ copyPhdr(PH, Out<ELFT>::Dynamic);
}
// Fix up the first entry's size.
@@ -620,7 +620,7 @@ template <class ELFT> void Writer<ELFT>:
}
template <class ELFT>
-void Writer<ELFT>::phdrSet(Elf_Phdr *PH, uint32_t Type, uint32_t Flags,
+void Writer<ELFT>::setPhdr(Elf_Phdr *PH, uint32_t Type, uint32_t Flags,
uintX_t FileOff, uintX_t VA, uintX_t Align) {
PH->p_type = Type;
PH->p_flags = Flags;
@@ -631,7 +631,7 @@ void Writer<ELFT>::phdrSet(Elf_Phdr *PH,
}
template <class ELFT>
-void Writer<ELFT>::phdrCopy(Elf_Phdr *PH,
+void Writer<ELFT>::copyPhdr(Elf_Phdr *PH,
OutputSectionBase<ELFT::Is64Bits> *From) {
PH->p_flags = toPhdrFlags(From->getFlags());
PH->p_offset = From->getFileOff();
More information about the llvm-commits
mailing list