mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Move alignment from MCSectionData to MCSection.
This starts merging MCSection and MCSectionData. There are a few issues with the current split between MCSection and MCSectionData. * It optimizes the the not as important case. We want the production of .o files to be really fast, but the split puts the information used for .o emission in a separate data structure. * The ELF/COFF/MachO hierarchy is not represented in MCSectionData, leading to some ad-hoc ways to represent the various flags. * It makes it harder to remember where each item is. The attached patch starts merging the two by moving the alignment from MCSectionData to MCSection. Most of the patch is actually just dropping 'const', since MCSectionData is mutable, but MCSection was not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,7 +73,7 @@ class AssemblerConstantPools {
|
||||
// sections in a stable order to ensure that we have print the
|
||||
// constant pools in a deterministic order when printing an assembly
|
||||
// file.
|
||||
typedef MapVector<const MCSection *, ConstantPool> ConstantPoolMapTy;
|
||||
typedef MapVector<MCSection *, ConstantPool> ConstantPoolMapTy;
|
||||
ConstantPoolMapTy ConstantPools;
|
||||
|
||||
public:
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
unsigned Size);
|
||||
|
||||
private:
|
||||
ConstantPool *getConstantPool(const MCSection *Section);
|
||||
ConstantPool &getOrCreateConstantPool(const MCSection *Section);
|
||||
ConstantPool *getConstantPool(MCSection *Section);
|
||||
ConstantPool &getOrCreateConstantPool(MCSection *Section);
|
||||
};
|
||||
} // end namespace llvm
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ public:
|
||||
/// Targets can implement this method to specify a section to switch to if the
|
||||
/// translation unit doesn't have any trampolines that require an executable
|
||||
/// stack.
|
||||
virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const {
|
||||
virtual MCSection *getNonexecutableStackSection(MCContext &Ctx) const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
namespace llvm {
|
||||
class MCAsmInfoELF : public MCAsmInfo {
|
||||
virtual void anchor();
|
||||
const MCSection *getNonexecutableStackSection(MCContext &Ctx) const final;
|
||||
MCSection *getNonexecutableStackSection(MCContext &Ctx) const final;
|
||||
|
||||
protected:
|
||||
MCAsmInfoELF();
|
||||
|
||||
@@ -557,7 +557,7 @@ public:
|
||||
|
||||
private:
|
||||
FragmentListType Fragments;
|
||||
const MCSection *Section;
|
||||
MCSection *Section;
|
||||
|
||||
/// Ordinal - The section index in the assemblers section list.
|
||||
unsigned Ordinal;
|
||||
@@ -565,9 +565,6 @@ private:
|
||||
/// LayoutOrder - The index of this section in the layout order.
|
||||
unsigned LayoutOrder;
|
||||
|
||||
/// Alignment - The maximum alignment seen in this section.
|
||||
unsigned Alignment;
|
||||
|
||||
/// \brief Keeping track of bundle-locked state.
|
||||
BundleLockStateType BundleLockState;
|
||||
|
||||
@@ -596,12 +593,12 @@ private:
|
||||
public:
|
||||
// Only for use as sentinel.
|
||||
MCSectionData();
|
||||
MCSectionData(const MCSection &Section, MCAssembler *A = nullptr);
|
||||
MCSectionData(MCSection &Section, MCAssembler *A = nullptr);
|
||||
|
||||
const MCSection &getSection() const { return *Section; }
|
||||
MCSection &getSection() const { return *Section; }
|
||||
|
||||
unsigned getAlignment() const { return Alignment; }
|
||||
void setAlignment(unsigned Value) { Alignment = Value; }
|
||||
unsigned getAlignment() const;
|
||||
void setAlignment(unsigned Value);
|
||||
|
||||
bool hasInstructions() const { return HasInstructions; }
|
||||
void setHasInstructions(bool Value) { HasInstructions = Value; }
|
||||
@@ -1021,7 +1018,7 @@ public:
|
||||
return *Entry;
|
||||
}
|
||||
|
||||
MCSectionData &getOrCreateSectionData(const MCSection &Section,
|
||||
MCSectionData &getOrCreateSectionData(MCSection &Section,
|
||||
bool *Created = nullptr) {
|
||||
MCSectionData *&Entry = SectionMap[&Section];
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace llvm {
|
||||
unsigned GenDwarfFileNumber;
|
||||
|
||||
/// Sections for generating the .debug_ranges and .debug_aranges sections.
|
||||
SetVector<const MCSection *> SectionsForRanges;
|
||||
SetVector<MCSection *> SectionsForRanges;
|
||||
|
||||
/// The information gathered from labels that will have dwarf label
|
||||
/// entries when generating dwarf assembly source files.
|
||||
@@ -197,9 +197,9 @@ namespace llvm {
|
||||
}
|
||||
};
|
||||
|
||||
StringMap<const MCSectionMachO *> MachOUniquingMap;
|
||||
std::map<ELFSectionKey, const MCSectionELF *> ELFUniquingMap;
|
||||
std::map<COFFSectionKey, const MCSectionCOFF *> COFFUniquingMap;
|
||||
StringMap<MCSectionMachO *> MachOUniquingMap;
|
||||
std::map<ELFSectionKey, MCSectionELF *> ELFUniquingMap;
|
||||
std::map<COFFSectionKey, MCSectionCOFF *> COFFUniquingMap;
|
||||
StringMap<bool> ELFRelSecNames;
|
||||
|
||||
/// Do automatic reset in destructor
|
||||
@@ -291,90 +291,85 @@ namespace llvm {
|
||||
|
||||
/// Return the MCSection for the specified mach-o section. This requires
|
||||
/// the operands to be valid.
|
||||
const MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
|
||||
unsigned TypeAndAttributes,
|
||||
unsigned Reserved2, SectionKind K,
|
||||
const char *BeginSymName = nullptr);
|
||||
MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
|
||||
unsigned TypeAndAttributes,
|
||||
unsigned Reserved2, SectionKind K,
|
||||
const char *BeginSymName = nullptr);
|
||||
|
||||
const MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
|
||||
unsigned TypeAndAttributes,
|
||||
SectionKind K,
|
||||
const char *BeginSymName = nullptr) {
|
||||
MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section,
|
||||
unsigned TypeAndAttributes, SectionKind K,
|
||||
const char *BeginSymName = nullptr) {
|
||||
return getMachOSection(Segment, Section, TypeAndAttributes, 0, K,
|
||||
BeginSymName);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags) {
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags) {
|
||||
return getELFSection(Section, Type, Flags, nullptr);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags,
|
||||
const char *BeginSymName) {
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, const char *BeginSymName) {
|
||||
return getELFSection(Section, Type, Flags, 0, "", BeginSymName);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group) {
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group) {
|
||||
return getELFSection(Section, Type, Flags, EntrySize, Group, nullptr);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group,
|
||||
const char *BeginSymName) {
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group, const char *BeginSymName) {
|
||||
return getELFSection(Section, Type, Flags, EntrySize, Group, ~0,
|
||||
BeginSymName);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group, unsigned UniqueID) {
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group, unsigned UniqueID) {
|
||||
return getELFSection(Section, Type, Flags, EntrySize, Group, UniqueID,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group, unsigned UniqueID,
|
||||
const char *BeginSymName);
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
StringRef Group, unsigned UniqueID,
|
||||
const char *BeginSymName);
|
||||
|
||||
const MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
MCSectionELF *getELFSection(StringRef Section, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
const MCSymbol *Group, unsigned UniqueID,
|
||||
const char *BeginSymName,
|
||||
const MCSectionELF *Associated);
|
||||
|
||||
MCSectionELF *createELFRelSection(StringRef Name, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
const MCSymbol *Group, unsigned UniqueID,
|
||||
const char *BeginSymName,
|
||||
const MCSymbol *Group,
|
||||
const MCSectionELF *Associated);
|
||||
|
||||
const MCSectionELF *createELFRelSection(StringRef Name, unsigned Type,
|
||||
unsigned Flags, unsigned EntrySize,
|
||||
const MCSymbol *Group,
|
||||
const MCSectionELF *Associated);
|
||||
void renameELFSection(MCSectionELF *Section, StringRef Name);
|
||||
|
||||
void renameELFSection(const MCSectionELF *Section, StringRef Name);
|
||||
MCSectionELF *createELFGroupSection(const MCSymbol *Group);
|
||||
|
||||
const MCSectionELF *createELFGroupSection(const MCSymbol *Group);
|
||||
MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics,
|
||||
SectionKind Kind, StringRef COMDATSymName,
|
||||
int Selection,
|
||||
const char *BeginSymName = nullptr);
|
||||
|
||||
const MCSectionCOFF *getCOFFSection(StringRef Section,
|
||||
unsigned Characteristics,
|
||||
SectionKind Kind,
|
||||
StringRef COMDATSymName, int Selection,
|
||||
const char *BeginSymName = nullptr);
|
||||
MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics,
|
||||
SectionKind Kind,
|
||||
const char *BeginSymName = nullptr);
|
||||
|
||||
const MCSectionCOFF *getCOFFSection(StringRef Section,
|
||||
unsigned Characteristics,
|
||||
SectionKind Kind,
|
||||
const char *BeginSymName = nullptr);
|
||||
|
||||
const MCSectionCOFF *getCOFFSection(StringRef Section);
|
||||
MCSectionCOFF *getCOFFSection(StringRef Section);
|
||||
|
||||
/// Gets or creates a section equivalent to Sec that is associated with the
|
||||
/// section containing KeySym. For example, to create a debug info section
|
||||
/// associated with an inline function, pass the normal debug info section
|
||||
/// as Sec and the function symbol as KeySym.
|
||||
const MCSectionCOFF *getAssociativeCOFFSection(const MCSectionCOFF *Sec,
|
||||
const MCSymbol *KeySym);
|
||||
MCSectionCOFF *getAssociativeCOFFSection(MCSectionCOFF *Sec,
|
||||
const MCSymbol *KeySym);
|
||||
|
||||
/// @}
|
||||
|
||||
@@ -467,10 +462,10 @@ namespace llvm {
|
||||
void setGenDwarfFileNumber(unsigned FileNumber) {
|
||||
GenDwarfFileNumber = FileNumber;
|
||||
}
|
||||
const SetVector<const MCSection *> &getGenDwarfSectionSyms() {
|
||||
const SetVector<MCSection *> &getGenDwarfSectionSyms() {
|
||||
return SectionsForRanges;
|
||||
}
|
||||
bool addGenDwarfSection(const MCSection *Sec) {
|
||||
bool addGenDwarfSection(MCSection *Sec) {
|
||||
return SectionsForRanges.insert(Sec);
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
// This is called when an instruction is assembled into the specified
|
||||
// section and if there is information from the last .loc directive that
|
||||
// has yet to have a line entry made for it is made.
|
||||
static void Make(MCObjectStreamer *MCOS, const MCSection *Section);
|
||||
static void Make(MCObjectStreamer *MCOS, MCSection *Section);
|
||||
};
|
||||
|
||||
/// \brief Instances of this class represent the line information for a compile
|
||||
@@ -153,14 +153,14 @@ public:
|
||||
class MCLineSection {
|
||||
public:
|
||||
// \brief Add an entry to this MCLineSection's line entries.
|
||||
void addLineEntry(const MCLineEntry &LineEntry, const MCSection *Sec) {
|
||||
void addLineEntry(const MCLineEntry &LineEntry, MCSection *Sec) {
|
||||
MCLineDivisions[Sec].push_back(LineEntry);
|
||||
}
|
||||
|
||||
typedef std::vector<MCLineEntry> MCLineEntryCollection;
|
||||
typedef MCLineEntryCollection::iterator iterator;
|
||||
typedef MCLineEntryCollection::const_iterator const_iterator;
|
||||
typedef MapVector<const MCSection *, MCLineEntryCollection> MCLineDivisionMap;
|
||||
typedef MapVector<MCSection *, MCLineEntryCollection> MCLineDivisionMap;
|
||||
|
||||
private:
|
||||
// A collection of MCLineEntry for each section.
|
||||
|
||||
@@ -48,8 +48,7 @@ public:
|
||||
/// @{
|
||||
|
||||
void InitSections(bool NoExecStack) override;
|
||||
void ChangeSection(const MCSection *Section,
|
||||
const MCExpr *Subsection) override;
|
||||
void ChangeSection(MCSection *Section, const MCExpr *Subsection) override;
|
||||
void EmitLabel(MCSymbol *Symbol) override;
|
||||
void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
|
||||
void EmitThumbFunc(MCSymbol *Func) override;
|
||||
@@ -68,10 +67,10 @@ public:
|
||||
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||
unsigned ByteAlignment) override;
|
||||
|
||||
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = nullptr,
|
||||
void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
|
||||
uint64_t Size = 0, unsigned ByteAlignment = 0) override;
|
||||
void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||
uint64_t Size, unsigned ByteAlignment = 0) override;
|
||||
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
|
||||
unsigned ByteAlignment = 0) override;
|
||||
void EmitValueImpl(const MCExpr *Value, unsigned Size,
|
||||
const SMLoc &Loc = SMLoc()) override;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
/// currently defined as the absolute section for constants, or
|
||||
/// otherwise the section associated with the first defined symbol in the
|
||||
/// expression.
|
||||
const MCSection *FindAssociatedSection() const;
|
||||
MCSection *FindAssociatedSection() const;
|
||||
|
||||
/// @}
|
||||
};
|
||||
@@ -558,7 +558,7 @@ public:
|
||||
const MCAsmLayout *Layout,
|
||||
const MCFixup *Fixup) const = 0;
|
||||
virtual void visitUsedExpr(MCStreamer& Streamer) const = 0;
|
||||
virtual const MCSection *FindAssociatedSection() const = 0;
|
||||
virtual MCSection *FindAssociatedSection() const = 0;
|
||||
|
||||
virtual void fixELFSymbolsInTLSFixups(MCAssembler &) const = 0;
|
||||
|
||||
|
||||
@@ -53,143 +53,139 @@ protected:
|
||||
/// should emit only an EH frame.
|
||||
unsigned CompactUnwindDwarfEHFrameOnly;
|
||||
|
||||
/// TextSection - Section directive for standard text.
|
||||
/// Section directive for standard text.
|
||||
///
|
||||
const MCSection *TextSection;
|
||||
MCSection *TextSection;
|
||||
|
||||
/// DataSection - Section directive for standard data.
|
||||
/// Section directive for standard data.
|
||||
///
|
||||
const MCSection *DataSection;
|
||||
MCSection *DataSection;
|
||||
|
||||
/// BSSSection - Section that is default initialized to zero.
|
||||
const MCSection *BSSSection;
|
||||
/// Section that is default initialized to zero.
|
||||
MCSection *BSSSection;
|
||||
|
||||
/// ReadOnlySection - Section that is readonly and can contain arbitrary
|
||||
/// initialized data. Targets are not required to have a readonly section.
|
||||
/// If they don't, various bits of code will fall back to using the data
|
||||
/// section for constants.
|
||||
const MCSection *ReadOnlySection;
|
||||
/// Section that is readonly and can contain arbitrary initialized data.
|
||||
/// Targets are not required to have a readonly section. If they don't,
|
||||
/// various bits of code will fall back to using the data section for
|
||||
/// constants.
|
||||
MCSection *ReadOnlySection;
|
||||
|
||||
/// StaticCtorSection - This section contains the static constructor pointer
|
||||
/// list.
|
||||
const MCSection *StaticCtorSection;
|
||||
/// This section contains the static constructor pointer list.
|
||||
MCSection *StaticCtorSection;
|
||||
|
||||
/// StaticDtorSection - This section contains the static destructor pointer
|
||||
/// list.
|
||||
const MCSection *StaticDtorSection;
|
||||
/// This section contains the static destructor pointer list.
|
||||
MCSection *StaticDtorSection;
|
||||
|
||||
/// LSDASection - If exception handling is supported by the target, this is
|
||||
/// the section the Language Specific Data Area information is emitted to.
|
||||
const MCSection *LSDASection;
|
||||
/// If exception handling is supported by the target, this is the section the
|
||||
/// Language Specific Data Area information is emitted to.
|
||||
MCSection *LSDASection;
|
||||
|
||||
/// CompactUnwindSection - If exception handling is supported by the target
|
||||
/// and the target can support a compact representation of the CIE and FDE,
|
||||
/// this is the section to emit them into.
|
||||
const MCSection *CompactUnwindSection;
|
||||
/// If exception handling is supported by the target and the target can
|
||||
/// support a compact representation of the CIE and FDE, this is the section
|
||||
/// to emit them into.
|
||||
MCSection *CompactUnwindSection;
|
||||
|
||||
// Dwarf sections for debug info. If a target supports debug info, these must
|
||||
// be set.
|
||||
const MCSection *DwarfAbbrevSection;
|
||||
const MCSection *DwarfInfoSection;
|
||||
const MCSection *DwarfLineSection;
|
||||
const MCSection *DwarfFrameSection;
|
||||
const MCSection *DwarfPubTypesSection;
|
||||
MCSection *DwarfAbbrevSection;
|
||||
MCSection *DwarfInfoSection;
|
||||
MCSection *DwarfLineSection;
|
||||
MCSection *DwarfFrameSection;
|
||||
MCSection *DwarfPubTypesSection;
|
||||
const MCSection *DwarfDebugInlineSection;
|
||||
const MCSection *DwarfStrSection;
|
||||
const MCSection *DwarfLocSection;
|
||||
const MCSection *DwarfARangesSection;
|
||||
const MCSection *DwarfRangesSection;
|
||||
MCSection *DwarfStrSection;
|
||||
MCSection *DwarfLocSection;
|
||||
MCSection *DwarfARangesSection;
|
||||
MCSection *DwarfRangesSection;
|
||||
// The pubnames section is no longer generated by default. The generation
|
||||
// can be enabled by a compiler flag.
|
||||
const MCSection *DwarfPubNamesSection;
|
||||
MCSection *DwarfPubNamesSection;
|
||||
|
||||
// DWARF5 Experimental Debug Info Sections
|
||||
/// DwarfAccelNamesSection, DwarfAccelObjCSection,
|
||||
/// DwarfAccelNamespaceSection, DwarfAccelTypesSection -
|
||||
/// If we use the DWARF accelerated hash tables then we want to emit these
|
||||
/// sections.
|
||||
const MCSection *DwarfAccelNamesSection;
|
||||
const MCSection *DwarfAccelObjCSection;
|
||||
const MCSection *DwarfAccelNamespaceSection;
|
||||
const MCSection *DwarfAccelTypesSection;
|
||||
MCSection *DwarfAccelNamesSection;
|
||||
MCSection *DwarfAccelObjCSection;
|
||||
MCSection *DwarfAccelNamespaceSection;
|
||||
MCSection *DwarfAccelTypesSection;
|
||||
|
||||
/// These are used for the Fission separate debug information files.
|
||||
const MCSection *DwarfInfoDWOSection;
|
||||
const MCSection *DwarfTypesDWOSection;
|
||||
const MCSection *DwarfAbbrevDWOSection;
|
||||
const MCSection *DwarfStrDWOSection;
|
||||
const MCSection *DwarfLineDWOSection;
|
||||
const MCSection *DwarfLocDWOSection;
|
||||
const MCSection *DwarfStrOffDWOSection;
|
||||
const MCSection *DwarfAddrSection;
|
||||
MCSection *DwarfInfoDWOSection;
|
||||
MCSection *DwarfTypesDWOSection;
|
||||
MCSection *DwarfAbbrevDWOSection;
|
||||
MCSection *DwarfStrDWOSection;
|
||||
MCSection *DwarfLineDWOSection;
|
||||
MCSection *DwarfLocDWOSection;
|
||||
MCSection *DwarfStrOffDWOSection;
|
||||
MCSection *DwarfAddrSection;
|
||||
|
||||
/// Sections for newer gnu pubnames and pubtypes.
|
||||
const MCSection *DwarfGnuPubNamesSection;
|
||||
const MCSection *DwarfGnuPubTypesSection;
|
||||
MCSection *DwarfGnuPubNamesSection;
|
||||
MCSection *DwarfGnuPubTypesSection;
|
||||
|
||||
const MCSection *COFFDebugSymbolsSection;
|
||||
MCSection *COFFDebugSymbolsSection;
|
||||
|
||||
// Extra TLS Variable Data section. If the target needs to put additional
|
||||
// information for a TLS variable, it'll go here.
|
||||
const MCSection *TLSExtraDataSection;
|
||||
MCSection *TLSExtraDataSection;
|
||||
|
||||
/// TLSDataSection - Section directive for Thread Local data.
|
||||
/// ELF, MachO and COFF.
|
||||
const MCSection *TLSDataSection; // Defaults to ".tdata".
|
||||
/// Section directive for Thread Local data. ELF, MachO and COFF.
|
||||
MCSection *TLSDataSection; // Defaults to ".tdata".
|
||||
|
||||
/// TLSBSSSection - Section directive for Thread Local uninitialized data.
|
||||
/// Null if this target doesn't support a BSS section.
|
||||
/// ELF and MachO only.
|
||||
const MCSection *TLSBSSSection; // Defaults to ".tbss".
|
||||
/// Section directive for Thread Local uninitialized data. Null if this target
|
||||
/// doesn't support a BSS section. ELF and MachO only.
|
||||
MCSection *TLSBSSSection; // Defaults to ".tbss".
|
||||
|
||||
/// StackMap section.
|
||||
const MCSection *StackMapSection;
|
||||
MCSection *StackMapSection;
|
||||
|
||||
/// EHFrameSection - EH frame section. It is initialized on demand so it
|
||||
/// can be overwritten (with uniquing).
|
||||
const MCSection *EHFrameSection;
|
||||
/// EH frame section. It is initialized on demand so it can be overwritten
|
||||
/// (with uniquing).
|
||||
MCSection *EHFrameSection;
|
||||
|
||||
/// ELF specific sections.
|
||||
///
|
||||
const MCSection *DataRelSection;
|
||||
MCSection *DataRelSection;
|
||||
const MCSection *DataRelLocalSection;
|
||||
const MCSection *DataRelROSection;
|
||||
const MCSection *DataRelROLocalSection;
|
||||
const MCSection *MergeableConst4Section;
|
||||
const MCSection *MergeableConst8Section;
|
||||
const MCSection *MergeableConst16Section;
|
||||
MCSection *DataRelROSection;
|
||||
MCSection *DataRelROLocalSection;
|
||||
MCSection *MergeableConst4Section;
|
||||
MCSection *MergeableConst8Section;
|
||||
MCSection *MergeableConst16Section;
|
||||
|
||||
/// MachO specific sections.
|
||||
///
|
||||
|
||||
/// TLSTLVSection - Section for thread local structure information.
|
||||
/// Contains the source code name of the variable, visibility and a pointer
|
||||
/// to the initial value (.tdata or .tbss).
|
||||
const MCSection *TLSTLVSection; // Defaults to ".tlv".
|
||||
/// Section for thread local structure information. Contains the source code
|
||||
/// name of the variable, visibility and a pointer to the initial value
|
||||
/// (.tdata or .tbss).
|
||||
MCSection *TLSTLVSection; // Defaults to ".tlv".
|
||||
|
||||
/// TLSThreadInitSection - Section for thread local data initialization
|
||||
/// functions.
|
||||
const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func".
|
||||
|
||||
const MCSection *CStringSection;
|
||||
const MCSection *UStringSection;
|
||||
const MCSection *TextCoalSection;
|
||||
const MCSection *ConstTextCoalSection;
|
||||
const MCSection *ConstDataSection;
|
||||
const MCSection *DataCoalSection;
|
||||
const MCSection *DataCommonSection;
|
||||
const MCSection *DataBSSSection;
|
||||
const MCSection *FourByteConstantSection;
|
||||
const MCSection *EightByteConstantSection;
|
||||
const MCSection *SixteenByteConstantSection;
|
||||
const MCSection *LazySymbolPointerSection;
|
||||
const MCSection *NonLazySymbolPointerSection;
|
||||
MCSection *CStringSection;
|
||||
MCSection *UStringSection;
|
||||
MCSection *TextCoalSection;
|
||||
MCSection *ConstTextCoalSection;
|
||||
MCSection *ConstDataSection;
|
||||
MCSection *DataCoalSection;
|
||||
MCSection *DataCommonSection;
|
||||
MCSection *DataBSSSection;
|
||||
MCSection *FourByteConstantSection;
|
||||
MCSection *EightByteConstantSection;
|
||||
MCSection *SixteenByteConstantSection;
|
||||
MCSection *LazySymbolPointerSection;
|
||||
MCSection *NonLazySymbolPointerSection;
|
||||
|
||||
/// COFF specific sections.
|
||||
///
|
||||
const MCSection *DrectveSection;
|
||||
const MCSection *PDataSection;
|
||||
const MCSection *XDataSection;
|
||||
MCSection *DrectveSection;
|
||||
MCSection *PDataSection;
|
||||
MCSection *XDataSection;
|
||||
|
||||
public:
|
||||
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM,
|
||||
@@ -214,94 +210,70 @@ public:
|
||||
return CompactUnwindDwarfEHFrameOnly;
|
||||
}
|
||||
|
||||
const MCSection *getTextSection() const { return TextSection; }
|
||||
const MCSection *getDataSection() const { return DataSection; }
|
||||
const MCSection *getBSSSection() const { return BSSSection; }
|
||||
const MCSection *getLSDASection() const { return LSDASection; }
|
||||
const MCSection *getCompactUnwindSection() const{
|
||||
return CompactUnwindSection;
|
||||
}
|
||||
const MCSection *getDwarfAbbrevSection() const { return DwarfAbbrevSection; }
|
||||
const MCSection *getDwarfInfoSection() const { return DwarfInfoSection; }
|
||||
const MCSection *getDwarfLineSection() const { return DwarfLineSection; }
|
||||
const MCSection *getDwarfFrameSection() const { return DwarfFrameSection; }
|
||||
const MCSection *getDwarfPubNamesSection() const{return DwarfPubNamesSection;}
|
||||
const MCSection *getDwarfPubTypesSection() const{return DwarfPubTypesSection;}
|
||||
const MCSection *getDwarfGnuPubNamesSection() const {
|
||||
MCSection *getTextSection() const { return TextSection; }
|
||||
MCSection *getDataSection() const { return DataSection; }
|
||||
MCSection *getBSSSection() const { return BSSSection; }
|
||||
MCSection *getLSDASection() const { return LSDASection; }
|
||||
MCSection *getCompactUnwindSection() const { return CompactUnwindSection; }
|
||||
MCSection *getDwarfAbbrevSection() const { return DwarfAbbrevSection; }
|
||||
MCSection *getDwarfInfoSection() const { return DwarfInfoSection; }
|
||||
MCSection *getDwarfLineSection() const { return DwarfLineSection; }
|
||||
MCSection *getDwarfFrameSection() const { return DwarfFrameSection; }
|
||||
MCSection *getDwarfPubNamesSection() const { return DwarfPubNamesSection; }
|
||||
MCSection *getDwarfPubTypesSection() const { return DwarfPubTypesSection; }
|
||||
MCSection *getDwarfGnuPubNamesSection() const {
|
||||
return DwarfGnuPubNamesSection;
|
||||
}
|
||||
const MCSection *getDwarfGnuPubTypesSection() const {
|
||||
MCSection *getDwarfGnuPubTypesSection() const {
|
||||
return DwarfGnuPubTypesSection;
|
||||
}
|
||||
const MCSection *getDwarfDebugInlineSection() const {
|
||||
return DwarfDebugInlineSection;
|
||||
}
|
||||
const MCSection *getDwarfStrSection() const { return DwarfStrSection; }
|
||||
const MCSection *getDwarfLocSection() const { return DwarfLocSection; }
|
||||
const MCSection *getDwarfARangesSection() const { return DwarfARangesSection;}
|
||||
const MCSection *getDwarfRangesSection() const { return DwarfRangesSection; }
|
||||
MCSection *getDwarfStrSection() const { return DwarfStrSection; }
|
||||
MCSection *getDwarfLocSection() const { return DwarfLocSection; }
|
||||
MCSection *getDwarfARangesSection() const { return DwarfARangesSection; }
|
||||
MCSection *getDwarfRangesSection() const { return DwarfRangesSection; }
|
||||
|
||||
// DWARF5 Experimental Debug Info Sections
|
||||
const MCSection *getDwarfAccelNamesSection() const {
|
||||
MCSection *getDwarfAccelNamesSection() const {
|
||||
return DwarfAccelNamesSection;
|
||||
}
|
||||
const MCSection *getDwarfAccelObjCSection() const {
|
||||
return DwarfAccelObjCSection;
|
||||
}
|
||||
const MCSection *getDwarfAccelNamespaceSection() const {
|
||||
MCSection *getDwarfAccelObjCSection() const { return DwarfAccelObjCSection; }
|
||||
MCSection *getDwarfAccelNamespaceSection() const {
|
||||
return DwarfAccelNamespaceSection;
|
||||
}
|
||||
const MCSection *getDwarfAccelTypesSection() const {
|
||||
MCSection *getDwarfAccelTypesSection() const {
|
||||
return DwarfAccelTypesSection;
|
||||
}
|
||||
const MCSection *getDwarfInfoDWOSection() const {
|
||||
return DwarfInfoDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfTypesSection(uint64_t Hash) const;
|
||||
const MCSection *getDwarfTypesDWOSection() const {
|
||||
return DwarfTypesDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfAbbrevDWOSection() const {
|
||||
return DwarfAbbrevDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfStrDWOSection() const {
|
||||
return DwarfStrDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfLineDWOSection() const {
|
||||
return DwarfLineDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfLocDWOSection() const {
|
||||
return DwarfLocDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfStrOffDWOSection() const {
|
||||
return DwarfStrOffDWOSection;
|
||||
}
|
||||
const MCSection *getDwarfAddrSection() const {
|
||||
return DwarfAddrSection;
|
||||
}
|
||||
MCSection *getDwarfInfoDWOSection() const { return DwarfInfoDWOSection; }
|
||||
MCSection *getDwarfTypesSection(uint64_t Hash) const;
|
||||
MCSection *getDwarfTypesDWOSection() const { return DwarfTypesDWOSection; }
|
||||
MCSection *getDwarfAbbrevDWOSection() const { return DwarfAbbrevDWOSection; }
|
||||
MCSection *getDwarfStrDWOSection() const { return DwarfStrDWOSection; }
|
||||
MCSection *getDwarfLineDWOSection() const { return DwarfLineDWOSection; }
|
||||
MCSection *getDwarfLocDWOSection() const { return DwarfLocDWOSection; }
|
||||
MCSection *getDwarfStrOffDWOSection() const { return DwarfStrOffDWOSection; }
|
||||
MCSection *getDwarfAddrSection() const { return DwarfAddrSection; }
|
||||
|
||||
const MCSection *getCOFFDebugSymbolsSection() const {
|
||||
MCSection *getCOFFDebugSymbolsSection() const {
|
||||
return COFFDebugSymbolsSection;
|
||||
}
|
||||
|
||||
const MCSection *getTLSExtraDataSection() const {
|
||||
return TLSExtraDataSection;
|
||||
}
|
||||
MCSection *getTLSExtraDataSection() const { return TLSExtraDataSection; }
|
||||
const MCSection *getTLSDataSection() const { return TLSDataSection; }
|
||||
const MCSection *getTLSBSSSection() const { return TLSBSSSection; }
|
||||
MCSection *getTLSBSSSection() const { return TLSBSSSection; }
|
||||
|
||||
const MCSection *getStackMapSection() const { return StackMapSection; }
|
||||
MCSection *getStackMapSection() const { return StackMapSection; }
|
||||
|
||||
/// ELF specific sections.
|
||||
///
|
||||
const MCSection *getDataRelSection() const { return DataRelSection; }
|
||||
MCSection *getDataRelSection() const { return DataRelSection; }
|
||||
const MCSection *getDataRelLocalSection() const {
|
||||
return DataRelLocalSection;
|
||||
}
|
||||
const MCSection *getDataRelROSection() const { return DataRelROSection; }
|
||||
const MCSection *getDataRelROLocalSection() const {
|
||||
return DataRelROLocalSection;
|
||||
}
|
||||
MCSection *getDataRelROSection() const { return DataRelROSection; }
|
||||
MCSection *getDataRelROLocalSection() const { return DataRelROLocalSection; }
|
||||
const MCSection *getMergeableConst4Section() const {
|
||||
return MergeableConst4Section;
|
||||
}
|
||||
@@ -320,14 +292,14 @@ public:
|
||||
}
|
||||
const MCSection *getCStringSection() const { return CStringSection; }
|
||||
const MCSection *getUStringSection() const { return UStringSection; }
|
||||
const MCSection *getTextCoalSection() const { return TextCoalSection; }
|
||||
MCSection *getTextCoalSection() const { return TextCoalSection; }
|
||||
const MCSection *getConstTextCoalSection() const {
|
||||
return ConstTextCoalSection;
|
||||
}
|
||||
const MCSection *getConstDataSection() const { return ConstDataSection; }
|
||||
const MCSection *getDataCoalSection() const { return DataCoalSection; }
|
||||
const MCSection *getDataCommonSection() const { return DataCommonSection; }
|
||||
const MCSection *getDataBSSSection() const { return DataBSSSection; }
|
||||
MCSection *getDataBSSSection() const { return DataBSSSection; }
|
||||
const MCSection *getFourByteConstantSection() const {
|
||||
return FourByteConstantSection;
|
||||
}
|
||||
@@ -337,20 +309,20 @@ public:
|
||||
const MCSection *getSixteenByteConstantSection() const {
|
||||
return SixteenByteConstantSection;
|
||||
}
|
||||
const MCSection *getLazySymbolPointerSection() const {
|
||||
MCSection *getLazySymbolPointerSection() const {
|
||||
return LazySymbolPointerSection;
|
||||
}
|
||||
const MCSection *getNonLazySymbolPointerSection() const {
|
||||
MCSection *getNonLazySymbolPointerSection() const {
|
||||
return NonLazySymbolPointerSection;
|
||||
}
|
||||
|
||||
/// COFF specific sections.
|
||||
///
|
||||
const MCSection *getDrectveSection() const { return DrectveSection; }
|
||||
const MCSection *getPDataSection() const { return PDataSection; }
|
||||
const MCSection *getXDataSection() const { return XDataSection; }
|
||||
MCSection *getDrectveSection() const { return DrectveSection; }
|
||||
MCSection *getPDataSection() const { return PDataSection; }
|
||||
MCSection *getXDataSection() const { return XDataSection; }
|
||||
|
||||
const MCSection *getEHFrameSection() {
|
||||
MCSection *getEHFrameSection() {
|
||||
if (!EHFrameSection)
|
||||
InitEHFrameSection();
|
||||
return EHFrameSection;
|
||||
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
/// fragment is not a data fragment.
|
||||
MCDataFragment *getOrCreateDataFragment();
|
||||
|
||||
bool changeSectionImpl(const MCSection *Section, const MCExpr *Subsection);
|
||||
bool changeSectionImpl(MCSection *Section, const MCExpr *Subsection);
|
||||
|
||||
/// If any labels have been emitted but not assigned fragments, ensure that
|
||||
/// they get assigned, either to F if possible or to a new data fragment.
|
||||
@@ -103,8 +103,7 @@ public:
|
||||
void EmitULEB128Value(const MCExpr *Value) override;
|
||||
void EmitSLEB128Value(const MCExpr *Value) override;
|
||||
void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override;
|
||||
void ChangeSection(const MCSection *Section,
|
||||
const MCExpr *Subsection) override;
|
||||
void ChangeSection(MCSection *Section, const MCExpr *Subsection) override;
|
||||
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo& STI) override;
|
||||
|
||||
/// \brief Emit an instruction to a special fragment, because this instruction
|
||||
@@ -147,7 +146,7 @@ public:
|
||||
bool emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo,
|
||||
unsigned Size) override;
|
||||
|
||||
bool mayHaveInstructions(const MCSection &Sec) const override {
|
||||
bool mayHaveInstructions(MCSection &Sec) const override {
|
||||
return Assembler->getOrCreateSectionData(Sec).hasInstructions();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -35,12 +35,14 @@ private:
|
||||
MCSection(const MCSection &) = delete;
|
||||
void operator=(const MCSection &) = delete;
|
||||
|
||||
mutable MCSymbol *Begin;
|
||||
mutable MCSymbol *End;
|
||||
MCSymbol *Begin;
|
||||
MCSymbol *End;
|
||||
/// The alignment requirement of this section.
|
||||
unsigned Alignment;
|
||||
|
||||
protected:
|
||||
MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin)
|
||||
: Begin(Begin), End(nullptr), Variant(V), Kind(K) {}
|
||||
: Begin(Begin), End(nullptr), Alignment(1), Variant(V), Kind(K) {}
|
||||
SectionVariant Variant;
|
||||
SectionKind Kind;
|
||||
|
||||
@@ -51,14 +53,20 @@ public:
|
||||
|
||||
SectionVariant getVariant() const { return Variant; }
|
||||
|
||||
MCSymbol *getBeginSymbol() const { return Begin; }
|
||||
void setBeginSymbol(MCSymbol *Sym) const {
|
||||
MCSymbol *getBeginSymbol() { return Begin; }
|
||||
const MCSymbol *getBeginSymbol() const {
|
||||
return const_cast<MCSection *>(this)->getBeginSymbol();
|
||||
}
|
||||
void setBeginSymbol(MCSymbol *Sym) {
|
||||
assert(!Begin);
|
||||
Begin = Sym;
|
||||
}
|
||||
MCSymbol *getEndSymbol(MCContext &Ctx) const;
|
||||
MCSymbol *getEndSymbol(MCContext &Ctx);
|
||||
bool hasEnded() const;
|
||||
|
||||
unsigned getAlignment() const { return Alignment; }
|
||||
void setAlignment(unsigned Value) { Alignment = Value; }
|
||||
|
||||
virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS,
|
||||
const MCExpr *Subsection) const = 0;
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class raw_ostream;
|
||||
class formatted_raw_ostream;
|
||||
class AssemblerConstantPools;
|
||||
|
||||
typedef std::pair<const MCSection *, const MCExpr *> MCSectionSubPair;
|
||||
typedef std::pair<MCSection *, const MCExpr *> MCSectionSubPair;
|
||||
|
||||
/// Target specific streamer interface. This is used so that targets can
|
||||
/// implement support for target specific assembly directives.
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
///
|
||||
/// This is called by PopSection and SwitchSection, if the current
|
||||
/// section changes.
|
||||
virtual void ChangeSection(const MCSection *, const MCExpr *);
|
||||
virtual void ChangeSection(MCSection *, const MCExpr *);
|
||||
|
||||
/// \brief Save the current and previous section on the section stack.
|
||||
void PushSection() {
|
||||
@@ -348,13 +348,13 @@ public:
|
||||
/// is required to update CurSection.
|
||||
///
|
||||
/// This corresponds to assembler directives like .section, .text, etc.
|
||||
virtual void SwitchSection(const MCSection *Section,
|
||||
virtual void SwitchSection(MCSection *Section,
|
||||
const MCExpr *Subsection = nullptr);
|
||||
|
||||
/// \brief Set the current section where code is being emitted to \p Section.
|
||||
/// This is required to update CurSection. This version does not call
|
||||
/// ChangeSection.
|
||||
void SwitchSectionNoChange(const MCSection *Section,
|
||||
void SwitchSectionNoChange(MCSection *Section,
|
||||
const MCExpr *Subsection = nullptr) {
|
||||
assert(Section && "Cannot switch to a null section!");
|
||||
MCSectionSubPair curSection = SectionStack.back().first;
|
||||
@@ -366,13 +366,13 @@ public:
|
||||
/// \brief Create the default sections and set the initial one.
|
||||
virtual void InitSections(bool NoExecStack);
|
||||
|
||||
MCSymbol *endSection(const MCSection *Section);
|
||||
MCSymbol *endSection(MCSection *Section);
|
||||
|
||||
/// \brief Sets the symbol's section.
|
||||
///
|
||||
/// Each emitted symbol will be tracked in the ordering table,
|
||||
/// so we can sort on them later.
|
||||
void AssignSection(MCSymbol *Symbol, const MCSection *Section);
|
||||
void AssignSection(MCSymbol *Symbol, MCSection *Section);
|
||||
|
||||
/// \brief Emit a label for \p Symbol into the current section.
|
||||
///
|
||||
@@ -500,9 +500,8 @@ public:
|
||||
/// \param Size - The size of the zerofill symbol.
|
||||
/// \param ByteAlignment - The alignment of the zerofill symbol if
|
||||
/// non-zero. This must be a power of 2 on some targets.
|
||||
virtual void EmitZerofill(const MCSection *Section,
|
||||
MCSymbol *Symbol = nullptr, uint64_t Size = 0,
|
||||
unsigned ByteAlignment = 0) = 0;
|
||||
virtual void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
|
||||
uint64_t Size = 0, unsigned ByteAlignment = 0) = 0;
|
||||
|
||||
/// \brief Emit a thread local bss (.tbss) symbol.
|
||||
///
|
||||
@@ -511,7 +510,7 @@ public:
|
||||
/// \param Size - The size of the symbol.
|
||||
/// \param ByteAlignment - The alignment of the thread local common symbol
|
||||
/// if non-zero. This must be a power of 2 on some targets.
|
||||
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||
virtual void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
|
||||
uint64_t Size, unsigned ByteAlignment = 0);
|
||||
|
||||
/// @}
|
||||
@@ -728,7 +727,7 @@ public:
|
||||
/// \brief Finish emission of machine code.
|
||||
void Finish();
|
||||
|
||||
virtual bool mayHaveInstructions(const MCSection &Sec) const { return true; }
|
||||
virtual bool mayHaveInstructions(MCSection &Sec) const { return true; }
|
||||
};
|
||||
|
||||
/// Create a dummy machine code streamer, which does nothing. This is useful for
|
||||
|
||||
@@ -150,17 +150,16 @@ class MCSymbol {
|
||||
// Special sentinal value for the absolute pseudo section.
|
||||
//
|
||||
// FIXME: Use a PointerInt wrapper for this?
|
||||
static const MCSection *AbsolutePseudoSection;
|
||||
static MCSection *AbsolutePseudoSection;
|
||||
|
||||
/// Name - The name of the symbol. The referred-to string data is actually
|
||||
/// held by the StringMap that lives in MCContext.
|
||||
StringRef Name;
|
||||
|
||||
/// Section - The section the symbol is defined in. This is null for
|
||||
/// undefined symbols, and the special AbsolutePseudoSection value for
|
||||
/// absolute symbols. If this is a variable symbol, this caches the
|
||||
/// variable value's section.
|
||||
mutable const MCSection *Section;
|
||||
/// The section the symbol is defined in. This is null for undefined symbols,
|
||||
/// and the special AbsolutePseudoSection value for absolute symbols. If this
|
||||
/// is a variable symbol, this caches the variable value's section.
|
||||
mutable MCSection *Section;
|
||||
|
||||
/// Value - If non-null, the value for a variable symbol.
|
||||
const MCExpr *Value;
|
||||
@@ -188,7 +187,7 @@ private: // MCContext creates and uniques these.
|
||||
|
||||
MCSymbol(const MCSymbol &) = delete;
|
||||
void operator=(const MCSymbol &) = delete;
|
||||
const MCSection *getSectionPtr() const {
|
||||
MCSection *getSectionPtr() const {
|
||||
if (Section || !Value)
|
||||
return Section;
|
||||
return Section = Value->FindAssociatedSection();
|
||||
@@ -255,15 +254,14 @@ public:
|
||||
/// isAbsolute - Check if this is an absolute symbol.
|
||||
bool isAbsolute() const { return getSectionPtr() == AbsolutePseudoSection; }
|
||||
|
||||
/// getSection - Get the section associated with a defined, non-absolute
|
||||
/// symbol.
|
||||
const MCSection &getSection() const {
|
||||
/// Get the section associated with a defined, non-absolute symbol.
|
||||
MCSection &getSection() const {
|
||||
assert(isInSection() && "Invalid accessor!");
|
||||
return *getSectionPtr();
|
||||
}
|
||||
|
||||
/// setSection - Mark the symbol as defined in the section \p S.
|
||||
void setSection(const MCSection &S) {
|
||||
/// Mark the symbol as defined in the section \p S.
|
||||
void setSection(MCSection &S) {
|
||||
assert(!isVariable() && "Cannot set section of variable");
|
||||
Section = &S;
|
||||
}
|
||||
|
||||
@@ -57,9 +57,9 @@ public:
|
||||
unsigned ByteAlignment) override;
|
||||
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||
unsigned ByteAlignment) override;
|
||||
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol, uint64_t Size,
|
||||
void EmitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
|
||||
unsigned ByteAlignment) override;
|
||||
void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol, uint64_t Size,
|
||||
void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
|
||||
unsigned ByteAlignment) override;
|
||||
void EmitFileDirective(StringRef Filename) override;
|
||||
void EmitIdent(StringRef IdentString) override;
|
||||
|
||||
@@ -65,10 +65,10 @@ struct FrameInfo {
|
||||
|
||||
class UnwindEmitter {
|
||||
public:
|
||||
static const MCSection *getPDataSection(const MCSymbol *Function,
|
||||
MCContext &Context);
|
||||
static const MCSection *getXDataSection(const MCSymbol *Function,
|
||||
MCContext &Context);
|
||||
static MCSection *getPDataSection(const MCSymbol *Function,
|
||||
MCContext &Context);
|
||||
static MCSection *getXDataSection(const MCSymbol *Function,
|
||||
MCContext &Context);
|
||||
|
||||
virtual ~UnwindEmitter() { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user