aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/MC/MCSectionELF.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/MC/MCSectionELF.h')
-rw-r--r--llvm/include/llvm/MC/MCSectionELF.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/llvm/include/llvm/MC/MCSectionELF.h b/llvm/include/llvm/MC/MCSectionELF.h
index f09d305..f089dd9 100644
--- a/llvm/include/llvm/MC/MCSectionELF.h
+++ b/llvm/include/llvm/MC/MCSectionELF.h
@@ -52,14 +52,15 @@ class MCSectionELF final : public MCSection {
private:
friend class MCContext;
+ friend class MCAsmInfoELF;
// The storage of Name is owned by MCContext's ELFUniquingMap.
MCSectionELF(StringRef Name, unsigned type, unsigned flags,
unsigned entrySize, const MCSymbolELF *group, bool IsComdat,
unsigned UniqueID, MCSymbol *Begin,
const MCSymbolELF *LinkedToSym)
- : MCSection(SV_ELF, Name, flags & ELF::SHF_EXECINSTR,
- type == ELF::SHT_NOBITS, Begin),
+ : MCSection(Name, flags & ELF::SHF_EXECINSTR, type == ELF::SHT_NOBITS,
+ Begin),
Type(type), Flags(flags), UniqueID(UniqueID), EntrySize(entrySize),
Group(group, IsComdat), LinkedToSym(LinkedToSym) {
assert((!(Flags & ELF::SHF_GROUP) || Group.getPointer()) &&
@@ -68,15 +69,7 @@ private:
Group.getPointer()->setIsSignature();
}
- // TODO Delete after we stop supporting generation of GNU-style .zdebug_*
- // sections.
- void setSectionName(StringRef Name) { this->Name = Name; }
-
public:
- /// Decides whether a '.section' directive should be printed before the
- /// section name
- bool shouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
-
unsigned getType() const { return Type; }
unsigned getFlags() const { return Flags; }
unsigned getEntrySize() const { return EntrySize; }
@@ -84,12 +77,6 @@ public:
const MCSymbolELF *getGroup() const { return Group.getPointer(); }
bool isComdat() const { return Group.getInt(); }
- void printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
- raw_ostream &OS,
- uint32_t Subsection) const override;
- bool useCodeAlign() const override;
- StringRef getVirtualSectionKind() const override;
-
bool isUnique() const { return UniqueID != NonUniqueID; }
unsigned getUniqueID() const { return UniqueID; }
@@ -105,10 +92,6 @@ public:
std::pair<uint64_t, uint64_t> getOffsets() const {
return std::make_pair(StartOffset, EndOffset);
}
-
- static bool classof(const MCSection *S) {
- return S->getVariant() == SV_ELF;
- }
};
} // end namespace llvm