[lld] r256899 - Rename Comdats -> ComdatGroups.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 18:06:33 PST 2016
Author: ruiu
Date: Tue Jan 5 20:06:33 2016
New Revision: 256899
URL: http://llvm.org/viewvc/llvm-project?rev=256899&view=rev
Log:
Rename Comdats -> ComdatGroups.
I usually prefer short names, but in this case the new descriptive
name should improve readability a bit.
Modified:
lld/trunk/ELF/InputFiles.cpp
lld/trunk/ELF/InputFiles.h
lld/trunk/ELF/SymbolTable.cpp
lld/trunk/ELF/SymbolTable.h
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=256899&r1=256898&r2=256899&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Tue Jan 5 20:06:33 2016
@@ -106,9 +106,9 @@ ObjectFile<ELFT>::getLocalSymbol(uintX_t
}
template <class ELFT>
-void ObjectFile<ELFT>::parse(DenseSet<StringRef> &Comdats) {
+void ObjectFile<ELFT>::parse(DenseSet<StringRef> &ComdatGroups) {
// Read section and symbol tables.
- initializeSections(Comdats);
+ initializeSections(ComdatGroups);
initializeSymbols();
}
@@ -172,7 +172,7 @@ static bool shouldMerge(const typename E
}
template <class ELFT>
-void ObjectFile<ELFT>::initializeSections(DenseSet<StringRef> &Comdats) {
+void ObjectFile<ELFT>::initializeSections(DenseSet<StringRef> &ComdatGroups) {
uint64_t Size = this->ELFObj.getNumSections();
Sections.resize(Size);
unsigned I = -1;
@@ -185,7 +185,7 @@ void ObjectFile<ELFT>::initializeSection
switch (Sec.sh_type) {
case SHT_GROUP:
Sections[I] = &InputSection<ELFT>::Discarded;
- if (Comdats.insert(getShtGroupSignature(Sec)).second)
+ if (ComdatGroups.insert(getShtGroupSignature(Sec)).second)
continue;
for (GroupEntryType E : getShtGroupEntries(Sec)) {
uint32_t SecIndex = E;
Modified: lld/trunk/ELF/InputFiles.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=256899&r1=256898&r2=256899&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.h (original)
+++ lld/trunk/ELF/InputFiles.h Tue Jan 5 20:06:33 2016
@@ -104,7 +104,7 @@ public:
ArrayRef<SymbolBody *> getSymbols() { return SymbolBodies; }
explicit ObjectFile(MemoryBufferRef M);
- void parse(llvm::DenseSet<StringRef> &Comdats);
+ void parse(llvm::DenseSet<StringRef> &ComdatGroups);
ArrayRef<InputSectionBase<ELFT> *> getSections() const { return Sections; }
InputSectionBase<ELFT> *getSection(const Elf_Sym &Sym) const;
@@ -127,7 +127,7 @@ public:
uint32_t getMipsGp0() const;
private:
- void initializeSections(llvm::DenseSet<StringRef> &Comdats);
+ void initializeSections(llvm::DenseSet<StringRef> &ComdatGroups);
void initializeSymbols();
InputSectionBase<ELFT> *createInputSection(const Elf_Shdr &Sec);
Modified: lld/trunk/ELF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=256899&r1=256898&r2=256899&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.cpp (original)
+++ lld/trunk/ELF/SymbolTable.cpp Tue Jan 5 20:06:33 2016
@@ -77,7 +77,7 @@ void SymbolTable<ELFT>::addFile(std::uni
// .o file
auto *F = cast<ObjectFile<ELFT>>(FileP);
ObjectFiles.emplace_back(cast<ObjectFile<ELFT>>(File.release()));
- F->parse(Comdats);
+ F->parse(ComdatGroups);
for (SymbolBody *B : F->getSymbols())
resolve(B);
}
Modified: lld/trunk/ELF/SymbolTable.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=256899&r1=256898&r2=256899&view=diff
==============================================================================
--- lld/trunk/ELF/SymbolTable.h (original)
+++ lld/trunk/ELF/SymbolTable.h Tue Jan 5 20:06:33 2016
@@ -78,7 +78,7 @@ private:
llvm::MapVector<StringRef, Symbol *> Symtab;
llvm::BumpPtrAllocator Alloc;
- llvm::DenseSet<StringRef> Comdats;
+ llvm::DenseSet<StringRef> ComdatGroups;
// The writer needs to infer the machine type from the object files.
std::vector<std::unique_ptr<ObjectFile<ELFT>>> ObjectFiles;
More information about the llvm-commits
mailing list