forked from OSchip/llvm-project
[MC] Remove unused renameELFSection
This commit is contained in:
parent
6977ff4006
commit
7feab85df8
|
@ -603,8 +603,6 @@ public:
|
|||
const MCSymbolELF *Group,
|
||||
const MCSectionELF *RelInfoSection);
|
||||
|
||||
void renameELFSection(MCSectionELF *Section, StringRef Name);
|
||||
|
||||
MCSectionELF *createELFGroupSection(const MCSymbolELF *Group, bool IsComdat);
|
||||
|
||||
void recordELFMergeableSectionInfo(StringRef SectionName, unsigned Flags,
|
||||
|
|
|
@ -468,24 +468,6 @@ MCSectionMachO *MCContext::getMachOSection(StringRef Segment, StringRef Section,
|
|||
return R.first->second;
|
||||
}
|
||||
|
||||
void MCContext::renameELFSection(MCSectionELF *Section, StringRef Name) {
|
||||
StringRef GroupName;
|
||||
if (const MCSymbol *Group = Section->getGroup())
|
||||
GroupName = Group->getName();
|
||||
|
||||
// This function is only used by .debug*, which should not have the
|
||||
// SHF_LINK_ORDER flag.
|
||||
unsigned UniqueID = Section->getUniqueID();
|
||||
ELFUniquingMap.erase(
|
||||
ELFSectionKey{Section->getName(), GroupName, "", UniqueID});
|
||||
auto I = ELFUniquingMap
|
||||
.insert(std::make_pair(
|
||||
ELFSectionKey{Name, GroupName, "", UniqueID}, Section))
|
||||
.first;
|
||||
StringRef CachedName = I->first.SectionName;
|
||||
const_cast<MCSectionELF *>(Section)->setSectionName(CachedName);
|
||||
}
|
||||
|
||||
MCSectionELF *MCContext::createELFSectionImpl(StringRef Section, unsigned Type,
|
||||
unsigned Flags, SectionKind K,
|
||||
unsigned EntrySize,
|
||||
|
|
Loading…
Reference in New Issue