forked from OSchip/llvm-project
Rename Comdats -> ComdatGroups.
I usually prefer short names, but in this case the new descriptive name should improve readability a bit. llvm-svn: 256899
This commit is contained in:
parent
7c713319b9
commit
52d3b67c1d
|
@ -106,9 +106,9 @@ ObjectFile<ELFT>::getLocalSymbol(uintX_t SymIndex) {
|
|||
}
|
||||
|
||||
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 ELFFile<ELFT>::Elf_Shdr &Sec) {
|
|||
}
|
||||
|
||||
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>::initializeSections(DenseSet<StringRef> &Comdats) {
|
|||
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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void SymbolTable<ELFT>::addFile(std::unique_ptr<InputFile> File) {
|
|||
// .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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue