mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
[C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d659d34219
commit
5747a143a2
@ -20,13 +20,13 @@ namespace llvm {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class MCAsmInfoMicrosoft : public MCAsmInfoCOFF {
|
class MCAsmInfoMicrosoft : public MCAsmInfoCOFF {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
protected:
|
protected:
|
||||||
explicit MCAsmInfoMicrosoft();
|
explicit MCAsmInfoMicrosoft();
|
||||||
};
|
};
|
||||||
|
|
||||||
class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF {
|
class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF {
|
||||||
virtual void anchor();
|
void anchor() override;
|
||||||
protected:
|
protected:
|
||||||
explicit MCAsmInfoGNUCOFF();
|
explicit MCAsmInfoGNUCOFF();
|
||||||
};
|
};
|
||||||
|
@ -44,53 +44,53 @@ public:
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void InitSections();
|
void InitSections() override;
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection);
|
const MCExpr *Subsection) override;
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
void EmitLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
void EmitDebugLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
|
void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func);
|
void EmitThumbFunc(MCSymbol *Func) override;
|
||||||
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
|
void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override;
|
||||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
|
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
|
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
|
||||||
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol);
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override;
|
||||||
virtual void EmitCOFFSymbolStorageClass(int StorageClass);
|
void EmitCOFFSymbolStorageClass(int StorageClass) override;
|
||||||
virtual void EmitCOFFSymbolType(int Type);
|
void EmitCOFFSymbolType(int Type) override;
|
||||||
virtual void EndCOFFSymbolDef();
|
void EndCOFFSymbolDef() override;
|
||||||
|
|
||||||
virtual MCSymbolData &getOrCreateSymbolData(MCSymbol *Symbol);
|
MCSymbolData &getOrCreateSymbolData(MCSymbol *Symbol) override;
|
||||||
|
|
||||||
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value);
|
void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) override;
|
||||||
|
|
||||||
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
|
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||||
uint64_t Size = 0, unsigned ByteAlignment = 0);
|
uint64_t Size = 0, unsigned ByteAlignment = 0) override;
|
||||||
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size, unsigned ByteAlignment = 0);
|
uint64_t Size, unsigned ByteAlignment = 0) override;
|
||||||
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size);
|
void EmitValueImpl(const MCExpr *Value, unsigned Size) override;
|
||||||
|
|
||||||
virtual void EmitFileDirective(StringRef Filename);
|
void EmitFileDirective(StringRef Filename) override;
|
||||||
|
|
||||||
virtual void EmitIdent(StringRef IdentString);
|
void EmitIdent(StringRef IdentString) override;
|
||||||
|
|
||||||
virtual void EmitValueToAlignment(unsigned, int64_t, unsigned, unsigned);
|
void EmitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override;
|
||||||
|
|
||||||
virtual void Flush();
|
void Flush() override;
|
||||||
|
|
||||||
virtual void FinishImpl();
|
void FinishImpl() override;
|
||||||
|
|
||||||
virtual void EmitBundleAlignMode(unsigned AlignPow2);
|
void EmitBundleAlignMode(unsigned AlignPow2) override;
|
||||||
virtual void EmitBundleLock(bool AlignToEnd);
|
void EmitBundleLock(bool AlignToEnd) override;
|
||||||
virtual void EmitBundleUnlock();
|
void EmitBundleUnlock() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
|
void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &) override;
|
||||||
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &);
|
void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override;
|
||||||
|
|
||||||
void fixSymbolsInTLSFixups(const MCExpr *expr);
|
void fixSymbolsInTLSFixups(const MCExpr *expr);
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ public:
|
|||||||
SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
|
SymbolLookUp(symbolLookUp), DisInfo(disInfo) {}
|
||||||
|
|
||||||
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
|
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream,
|
||||||
int64_t Value,
|
int64_t Value, uint64_t Address, bool IsBranch,
|
||||||
uint64_t Address, bool IsBranch,
|
uint64_t Offset, uint64_t InstSize) override;
|
||||||
uint64_t Offset, uint64_t InstSize);
|
|
||||||
void tryAddingPcLoadReferenceComment(raw_ostream &CommentStream,
|
void tryAddingPcLoadReferenceComment(raw_ostream &CommentStream,
|
||||||
int64_t Value, uint64_t Address);
|
int64_t Value,
|
||||||
|
uint64_t Address) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
/// @name Lifetime management Methods
|
/// @name Lifetime management Methods
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void reset();
|
void reset() override;
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ public:
|
|||||||
|
|
||||||
void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
|
void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
|
||||||
const MCFragment *Fragment, const MCFixup &Fixup,
|
const MCFragment *Fragment, const MCFixup &Fixup,
|
||||||
MCValue Target, uint64_t &FixedValue);
|
MCValue Target, uint64_t &FixedValue) override;
|
||||||
|
|
||||||
void BindIndirectSymbols(MCAssembler &Asm);
|
void BindIndirectSymbols(MCAssembler &Asm);
|
||||||
|
|
||||||
@ -247,15 +247,16 @@ public:
|
|||||||
|
|
||||||
void markAbsoluteVariableSymbols(MCAssembler &Asm,
|
void markAbsoluteVariableSymbols(MCAssembler &Asm,
|
||||||
const MCAsmLayout &Layout);
|
const MCAsmLayout &Layout);
|
||||||
void ExecutePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout);
|
void ExecutePostLayoutBinding(MCAssembler &Asm,
|
||||||
|
const MCAsmLayout &Layout) override;
|
||||||
|
|
||||||
virtual bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
|
bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
|
||||||
const MCSymbolData &DataA,
|
const MCSymbolData &DataA,
|
||||||
const MCFragment &FB,
|
const MCFragment &FB,
|
||||||
bool InSet,
|
bool InSet,
|
||||||
bool IsPCRel) const;
|
bool IsPCRel) const override;
|
||||||
|
|
||||||
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
|
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ class MCObjectStreamer : public MCStreamer {
|
|||||||
MCSectionData::iterator CurInsertionPoint;
|
MCSectionData::iterator CurInsertionPoint;
|
||||||
|
|
||||||
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo&) = 0;
|
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo&) = 0;
|
||||||
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
|
void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override;
|
||||||
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame);
|
void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &_OS,
|
MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_ostream &_OS,
|
||||||
@ -49,10 +49,10 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/// state management
|
/// state management
|
||||||
virtual void reset();
|
void reset() override;
|
||||||
|
|
||||||
/// Object streamers require the integrated assembler.
|
/// Object streamers require the integrated assembler.
|
||||||
virtual bool isIntegratedAssemblerRequired() const { return true; }
|
bool isIntegratedAssemblerRequired() const override { return true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MCSectionData *getCurrentSectionData() const {
|
MCSectionData *getCurrentSectionData() const {
|
||||||
@ -78,47 +78,45 @@ public:
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
void EmitLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
void EmitDebugLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value);
|
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
|
||||||
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size);
|
void EmitValueImpl(const MCExpr *Value, unsigned Size) override;
|
||||||
virtual void EmitULEB128Value(const MCExpr *Value);
|
void EmitULEB128Value(const MCExpr *Value) override;
|
||||||
virtual void EmitSLEB128Value(const MCExpr *Value);
|
void EmitSLEB128Value(const MCExpr *Value) override;
|
||||||
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
|
void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override;
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection);
|
const MCExpr *Subsection) override;
|
||||||
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo& STI);
|
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo& STI) override;
|
||||||
|
|
||||||
/// \brief Emit an instruction to a special fragment, because this instruction
|
/// \brief Emit an instruction to a special fragment, because this instruction
|
||||||
/// can change its size during relaxation.
|
/// can change its size during relaxation.
|
||||||
virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
|
virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &);
|
||||||
|
|
||||||
virtual void EmitBundleAlignMode(unsigned AlignPow2);
|
void EmitBundleAlignMode(unsigned AlignPow2) override;
|
||||||
virtual void EmitBundleLock(bool AlignToEnd);
|
void EmitBundleLock(bool AlignToEnd) override;
|
||||||
virtual void EmitBundleUnlock();
|
void EmitBundleUnlock() override;
|
||||||
virtual void EmitBytes(StringRef Data);
|
void EmitBytes(StringRef Data) override;
|
||||||
virtual void EmitValueToAlignment(unsigned ByteAlignment,
|
void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
|
||||||
int64_t Value = 0,
|
|
||||||
unsigned ValueSize = 1,
|
unsigned ValueSize = 1,
|
||||||
unsigned MaxBytesToEmit = 0);
|
unsigned MaxBytesToEmit = 0) override;
|
||||||
virtual void EmitCodeAlignment(unsigned ByteAlignment,
|
void EmitCodeAlignment(unsigned ByteAlignment,
|
||||||
unsigned MaxBytesToEmit = 0);
|
unsigned MaxBytesToEmit = 0) override;
|
||||||
virtual bool EmitValueToOffset(const MCExpr *Offset, unsigned char Value);
|
bool EmitValueToOffset(const MCExpr *Offset, unsigned char Value) override;
|
||||||
virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
||||||
unsigned Column, unsigned Flags,
|
unsigned Column, unsigned Flags,
|
||||||
unsigned Isa, unsigned Discriminator,
|
unsigned Isa, unsigned Discriminator,
|
||||||
StringRef FileName);
|
StringRef FileName) override;
|
||||||
virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
|
void EmitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel,
|
||||||
const MCSymbol *LastLabel,
|
|
||||||
const MCSymbol *Label,
|
const MCSymbol *Label,
|
||||||
unsigned PointerSize);
|
unsigned PointerSize) override;
|
||||||
virtual void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
|
void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
|
||||||
const MCSymbol *Label);
|
const MCSymbol *Label) override;
|
||||||
virtual void EmitGPRel32Value(const MCExpr *Value);
|
void EmitGPRel32Value(const MCExpr *Value) override;
|
||||||
virtual void EmitGPRel64Value(const MCExpr *Value);
|
void EmitGPRel64Value(const MCExpr *Value) override;
|
||||||
virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue);
|
void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
|
||||||
virtual void EmitZeros(uint64_t NumBytes);
|
void EmitZeros(uint64_t NumBytes) override;
|
||||||
virtual void FinishImpl();
|
void FinishImpl() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
@ -50,10 +50,11 @@ public:
|
|||||||
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &cStream,
|
bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &cStream,
|
||||||
int64_t Value, uint64_t Address,
|
int64_t Value, uint64_t Address,
|
||||||
bool IsBranch, uint64_t Offset,
|
bool IsBranch, uint64_t Offset,
|
||||||
uint64_t InstSize);
|
uint64_t InstSize) override;
|
||||||
|
|
||||||
void tryAddingPcLoadReferenceComment(raw_ostream &cStream,
|
void tryAddingPcLoadReferenceComment(raw_ostream &cStream,
|
||||||
int64_t Value, uint64_t Address);
|
int64_t Value,
|
||||||
|
uint64_t Address) override;
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \brief Look for an external function symbol at \p Addr.
|
/// \brief Look for an external function symbol at \p Addr.
|
||||||
|
@ -248,11 +248,9 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
const MCAsmLayout &Layout,
|
const MCAsmLayout &Layout,
|
||||||
const SectionIndexMapTy &SectionIndexMap);
|
const SectionIndexMapTy &SectionIndexMap);
|
||||||
|
|
||||||
virtual void RecordRelocation(const MCAssembler &Asm,
|
void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
|
||||||
const MCAsmLayout &Layout,
|
const MCFragment *Fragment, const MCFixup &Fixup,
|
||||||
const MCFragment *Fragment,
|
MCValue Target, uint64_t &FixedValue) override;
|
||||||
const MCFixup &Fixup,
|
|
||||||
MCValue Target, uint64_t &FixedValue);
|
|
||||||
|
|
||||||
uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
|
uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
|
||||||
const MCSymbol *S);
|
const MCSymbol *S);
|
||||||
@ -299,8 +297,8 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
SectionIndexMapTy &SectionIndexMap,
|
SectionIndexMapTy &SectionIndexMap,
|
||||||
const RelMapTy &RelMap);
|
const RelMapTy &RelMap);
|
||||||
|
|
||||||
virtual void ExecutePostLayoutBinding(MCAssembler &Asm,
|
void ExecutePostLayoutBinding(MCAssembler &Asm,
|
||||||
const MCAsmLayout &Layout);
|
const MCAsmLayout &Layout) override;
|
||||||
|
|
||||||
void WriteSectionHeader(MCAssembler &Asm, const GroupMapTy &GroupMap,
|
void WriteSectionHeader(MCAssembler &Asm, const GroupMapTy &GroupMap,
|
||||||
const MCAsmLayout &Layout,
|
const MCAsmLayout &Layout,
|
||||||
@ -319,14 +317,14 @@ class ELFObjectWriter : public MCObjectWriter {
|
|||||||
MCDataFragment *F,
|
MCDataFragment *F,
|
||||||
const MCSectionData *SD);
|
const MCSectionData *SD);
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
|
IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,
|
||||||
const MCSymbolData &DataA,
|
const MCSymbolData &DataA,
|
||||||
const MCFragment &FB,
|
const MCFragment &FB,
|
||||||
bool InSet,
|
bool InSet,
|
||||||
bool IsPCRel) const;
|
bool IsPCRel) const override;
|
||||||
|
|
||||||
virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
|
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;
|
||||||
void WriteSection(MCAssembler &Asm,
|
void WriteSection(MCAssembler &Asm,
|
||||||
const SectionIndexMapTy &SectionIndexMap,
|
const SectionIndexMapTy &SectionIndexMap,
|
||||||
uint32_t GroupSymbolIndex,
|
uint32_t GroupSymbolIndex,
|
||||||
|
@ -60,8 +60,8 @@ private:
|
|||||||
bool needsSet(const MCExpr *Value);
|
bool needsSet(const MCExpr *Value);
|
||||||
|
|
||||||
void EmitRegisterName(int64_t Register);
|
void EmitRegisterName(int64_t Register);
|
||||||
virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame);
|
void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override;
|
||||||
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame);
|
void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MCAsmStreamer(MCContext &Context, formatted_raw_ostream &os,
|
MCAsmStreamer(MCContext &Context, formatted_raw_ostream &os,
|
||||||
@ -90,16 +90,16 @@ public:
|
|||||||
|
|
||||||
/// isVerboseAsm - Return true if this streamer supports verbose assembly at
|
/// isVerboseAsm - Return true if this streamer supports verbose assembly at
|
||||||
/// all.
|
/// all.
|
||||||
virtual bool isVerboseAsm() const { return IsVerboseAsm; }
|
bool isVerboseAsm() const override { return IsVerboseAsm; }
|
||||||
|
|
||||||
/// hasRawTextSupport - We support EmitRawText.
|
/// hasRawTextSupport - We support EmitRawText.
|
||||||
virtual bool hasRawTextSupport() const { return true; }
|
bool hasRawTextSupport() const override { return true; }
|
||||||
|
|
||||||
/// AddComment - Add a comment that can be emitted to the generated .s
|
/// AddComment - Add a comment that can be emitted to the generated .s
|
||||||
/// file if applicable as a QoI issue to make the output of the compiler
|
/// file if applicable as a QoI issue to make the output of the compiler
|
||||||
/// more readable. This only affects the MCAsmStreamer, and only when
|
/// more readable. This only affects the MCAsmStreamer, and only when
|
||||||
/// verbose assembly output is enabled.
|
/// verbose assembly output is enabled.
|
||||||
virtual void AddComment(const Twine &T);
|
void AddComment(const Twine &T) override;
|
||||||
|
|
||||||
/// AddEncodingComment - Add a comment showing the encoding of an instruction.
|
/// AddEncodingComment - Add a comment showing the encoding of an instruction.
|
||||||
virtual void AddEncodingComment(const MCInst &Inst, const MCSubtargetInfo &);
|
virtual void AddEncodingComment(const MCInst &Inst, const MCSubtargetInfo &);
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
/// GetCommentOS - Return a raw_ostream that comments can be written to.
|
/// GetCommentOS - Return a raw_ostream that comments can be written to.
|
||||||
/// Unlike AddComment, you are required to terminate comments with \n if you
|
/// Unlike AddComment, you are required to terminate comments with \n if you
|
||||||
/// use this method.
|
/// use this method.
|
||||||
virtual raw_ostream &GetCommentOS() {
|
raw_ostream &GetCommentOS() override {
|
||||||
if (!IsVerboseAsm)
|
if (!IsVerboseAsm)
|
||||||
return nulls(); // Discard comments unless in verbose asm mode.
|
return nulls(); // Discard comments unless in verbose asm mode.
|
||||||
return CommentStream;
|
return CommentStream;
|
||||||
@ -116,141 +116,139 @@ public:
|
|||||||
void emitRawComment(const Twine &T, bool TabPrefix = true) override;
|
void emitRawComment(const Twine &T, bool TabPrefix = true) override;
|
||||||
|
|
||||||
/// AddBlankLine - Emit a blank line to a .s file to pretty it up.
|
/// AddBlankLine - Emit a blank line to a .s file to pretty it up.
|
||||||
virtual void AddBlankLine() {
|
void AddBlankLine() override {
|
||||||
EmitEOL();
|
EmitEOL();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection);
|
const MCExpr *Subsection) override;
|
||||||
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
void EmitLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
void EmitDebugLabel(MCSymbol *Symbol) override;
|
||||||
|
|
||||||
virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
|
void EmitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol) override;
|
||||||
MCSymbol *EHSymbol);
|
void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
|
void EmitLinkerOptions(ArrayRef<std::string> Options) override;
|
||||||
virtual void EmitLinkerOptions(ArrayRef<std::string> Options);
|
void EmitDataRegion(MCDataRegionType Kind) override;
|
||||||
virtual void EmitDataRegion(MCDataRegionType Kind);
|
void EmitThumbFunc(MCSymbol *Func) override;
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func);
|
|
||||||
|
|
||||||
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value);
|
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
|
||||||
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol);
|
void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override;
|
||||||
virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
|
void EmitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel,
|
||||||
const MCSymbol *LastLabel,
|
|
||||||
const MCSymbol *Label,
|
const MCSymbol *Label,
|
||||||
unsigned PointerSize);
|
unsigned PointerSize) override;
|
||||||
virtual void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
|
void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel,
|
||||||
const MCSymbol *Label);
|
const MCSymbol *Label) override;
|
||||||
|
|
||||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
|
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
|
||||||
|
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
|
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
|
||||||
virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol);
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override;
|
||||||
virtual void EmitCOFFSymbolStorageClass(int StorageClass);
|
void EmitCOFFSymbolStorageClass(int StorageClass) override;
|
||||||
virtual void EmitCOFFSymbolType(int Type);
|
void EmitCOFFSymbolType(int Type) override;
|
||||||
virtual void EndCOFFSymbolDef();
|
void EndCOFFSymbolDef() override;
|
||||||
virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol);
|
void EmitCOFFSectionIndex(MCSymbol const *Symbol) override;
|
||||||
virtual void EmitCOFFSecRel32(MCSymbol const *Symbol);
|
void EmitCOFFSecRel32(MCSymbol const *Symbol) override;
|
||||||
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value);
|
void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) override;
|
||||||
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
|
|
||||||
/// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
|
/// EmitLocalCommonSymbol - Emit a local common (.lcomm) symbol.
|
||||||
///
|
///
|
||||||
/// @param Symbol - The common symbol to emit.
|
/// @param Symbol - The common symbol to emit.
|
||||||
/// @param Size - The size of the common symbol.
|
/// @param Size - The size of the common symbol.
|
||||||
/// @param ByteAlignment - The alignment of the common symbol in bytes.
|
/// @param ByteAlignment - The alignment of the common symbol in bytes.
|
||||||
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
|
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||||
uint64_t Size = 0, unsigned ByteAlignment = 0);
|
uint64_t Size = 0, unsigned ByteAlignment = 0) override;
|
||||||
|
|
||||||
virtual void EmitTBSSSymbol (const MCSection *Section, MCSymbol *Symbol,
|
void EmitTBSSSymbol (const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size, unsigned ByteAlignment = 0);
|
uint64_t Size, unsigned ByteAlignment = 0) override;
|
||||||
|
|
||||||
virtual void EmitBytes(StringRef Data);
|
void EmitBytes(StringRef Data) override;
|
||||||
|
|
||||||
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size);
|
void EmitValueImpl(const MCExpr *Value, unsigned Size) override;
|
||||||
virtual void EmitIntValue(uint64_t Value, unsigned Size);
|
void EmitIntValue(uint64_t Value, unsigned Size) override;
|
||||||
|
|
||||||
virtual void EmitULEB128Value(const MCExpr *Value);
|
void EmitULEB128Value(const MCExpr *Value) override;
|
||||||
|
|
||||||
virtual void EmitSLEB128Value(const MCExpr *Value);
|
void EmitSLEB128Value(const MCExpr *Value) override;
|
||||||
|
|
||||||
virtual void EmitGPRel64Value(const MCExpr *Value);
|
void EmitGPRel64Value(const MCExpr *Value) override;
|
||||||
|
|
||||||
virtual void EmitGPRel32Value(const MCExpr *Value);
|
void EmitGPRel32Value(const MCExpr *Value) override;
|
||||||
|
|
||||||
|
|
||||||
virtual void EmitFill(uint64_t NumBytes, uint8_t FillValue);
|
void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
|
||||||
|
|
||||||
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
|
void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
|
||||||
unsigned ValueSize = 1,
|
unsigned ValueSize = 1,
|
||||||
unsigned MaxBytesToEmit = 0);
|
unsigned MaxBytesToEmit = 0) override;
|
||||||
|
|
||||||
virtual void EmitCodeAlignment(unsigned ByteAlignment,
|
void EmitCodeAlignment(unsigned ByteAlignment,
|
||||||
unsigned MaxBytesToEmit = 0);
|
unsigned MaxBytesToEmit = 0) override;
|
||||||
|
|
||||||
virtual bool EmitValueToOffset(const MCExpr *Offset,
|
bool EmitValueToOffset(const MCExpr *Offset,
|
||||||
unsigned char Value = 0);
|
unsigned char Value = 0) override;
|
||||||
|
|
||||||
virtual void EmitFileDirective(StringRef Filename);
|
void EmitFileDirective(StringRef Filename) override;
|
||||||
virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
|
bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
|
||||||
StringRef Filename, unsigned CUID = 0);
|
StringRef Filename, unsigned CUID = 0) override;
|
||||||
virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
||||||
unsigned Column, unsigned Flags,
|
unsigned Column, unsigned Flags,
|
||||||
unsigned Isa, unsigned Discriminator,
|
unsigned Isa, unsigned Discriminator,
|
||||||
StringRef FileName);
|
StringRef FileName) override;
|
||||||
|
|
||||||
virtual void EmitIdent(StringRef IdentString);
|
void EmitIdent(StringRef IdentString) override;
|
||||||
virtual void EmitCFISections(bool EH, bool Debug);
|
void EmitCFISections(bool EH, bool Debug) override;
|
||||||
virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset);
|
void EmitCFIDefCfa(int64_t Register, int64_t Offset) override;
|
||||||
virtual void EmitCFIDefCfaOffset(int64_t Offset);
|
void EmitCFIDefCfaOffset(int64_t Offset) override;
|
||||||
virtual void EmitCFIDefCfaRegister(int64_t Register);
|
void EmitCFIDefCfaRegister(int64_t Register) override;
|
||||||
virtual void EmitCFIOffset(int64_t Register, int64_t Offset);
|
void EmitCFIOffset(int64_t Register, int64_t Offset) override;
|
||||||
virtual void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding);
|
void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding) override;
|
||||||
virtual void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding);
|
void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding) override;
|
||||||
virtual void EmitCFIRememberState();
|
void EmitCFIRememberState() override;
|
||||||
virtual void EmitCFIRestoreState();
|
void EmitCFIRestoreState() override;
|
||||||
virtual void EmitCFISameValue(int64_t Register);
|
void EmitCFISameValue(int64_t Register) override;
|
||||||
virtual void EmitCFIRelOffset(int64_t Register, int64_t Offset);
|
void EmitCFIRelOffset(int64_t Register, int64_t Offset) override;
|
||||||
virtual void EmitCFIAdjustCfaOffset(int64_t Adjustment);
|
void EmitCFIAdjustCfaOffset(int64_t Adjustment) override;
|
||||||
virtual void EmitCFISignalFrame();
|
void EmitCFISignalFrame() override;
|
||||||
virtual void EmitCFIUndefined(int64_t Register);
|
void EmitCFIUndefined(int64_t Register) override;
|
||||||
virtual void EmitCFIRegister(int64_t Register1, int64_t Register2);
|
void EmitCFIRegister(int64_t Register1, int64_t Register2) override;
|
||||||
virtual void EmitCFIWindowSave();
|
void EmitCFIWindowSave() override;
|
||||||
|
|
||||||
virtual void EmitWin64EHStartProc(const MCSymbol *Symbol);
|
void EmitWin64EHStartProc(const MCSymbol *Symbol) override;
|
||||||
virtual void EmitWin64EHEndProc();
|
void EmitWin64EHEndProc() override;
|
||||||
virtual void EmitWin64EHStartChained();
|
void EmitWin64EHStartChained() override;
|
||||||
virtual void EmitWin64EHEndChained();
|
void EmitWin64EHEndChained() override;
|
||||||
virtual void EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
|
void EmitWin64EHHandler(const MCSymbol *Sym, bool Unwind,
|
||||||
bool Except);
|
bool Except) override;
|
||||||
virtual void EmitWin64EHHandlerData();
|
void EmitWin64EHHandlerData() override;
|
||||||
virtual void EmitWin64EHPushReg(unsigned Register);
|
void EmitWin64EHPushReg(unsigned Register) override;
|
||||||
virtual void EmitWin64EHSetFrame(unsigned Register, unsigned Offset);
|
void EmitWin64EHSetFrame(unsigned Register, unsigned Offset) override;
|
||||||
virtual void EmitWin64EHAllocStack(unsigned Size);
|
void EmitWin64EHAllocStack(unsigned Size) override;
|
||||||
virtual void EmitWin64EHSaveReg(unsigned Register, unsigned Offset);
|
void EmitWin64EHSaveReg(unsigned Register, unsigned Offset) override;
|
||||||
virtual void EmitWin64EHSaveXMM(unsigned Register, unsigned Offset);
|
void EmitWin64EHSaveXMM(unsigned Register, unsigned Offset) override;
|
||||||
virtual void EmitWin64EHPushFrame(bool Code);
|
void EmitWin64EHPushFrame(bool Code) override;
|
||||||
virtual void EmitWin64EHEndProlog();
|
void EmitWin64EHEndProlog() override;
|
||||||
|
|
||||||
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI);
|
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override;
|
||||||
|
|
||||||
virtual void EmitBundleAlignMode(unsigned AlignPow2);
|
void EmitBundleAlignMode(unsigned AlignPow2) override;
|
||||||
virtual void EmitBundleLock(bool AlignToEnd);
|
void EmitBundleLock(bool AlignToEnd) override;
|
||||||
virtual void EmitBundleUnlock();
|
void EmitBundleUnlock() override;
|
||||||
|
|
||||||
/// EmitRawText - If this file is backed by an assembly streamer, this dumps
|
/// EmitRawText - If this file is backed by an assembly streamer, this dumps
|
||||||
/// the specified string in the output .s file. This capability is
|
/// the specified string in the output .s file. This capability is
|
||||||
/// indicated by the hasRawTextSupport() predicate.
|
/// indicated by the hasRawTextSupport() predicate.
|
||||||
virtual void EmitRawTextImpl(StringRef String);
|
void EmitRawTextImpl(StringRef String) override;
|
||||||
|
|
||||||
virtual void FinishImpl();
|
void FinishImpl() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end anonymous namespace.
|
} // end anonymous namespace.
|
||||||
|
@ -31,7 +31,7 @@ namespace {
|
|||||||
|
|
||||||
class MCMachOStreamer : public MCObjectStreamer {
|
class MCMachOStreamer : public MCObjectStreamer {
|
||||||
private:
|
private:
|
||||||
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI);
|
void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI) override;
|
||||||
|
|
||||||
void EmitDataRegion(DataRegionData::KindTy Kind);
|
void EmitDataRegion(DataRegionData::KindTy Kind);
|
||||||
void EmitDataRegionEnd();
|
void EmitDataRegionEnd();
|
||||||
@ -43,52 +43,51 @@ public:
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
void EmitLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
void EmitDebugLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitEHSymAttributes(const MCSymbol *Symbol,
|
void EmitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol) override;
|
||||||
MCSymbol *EHSymbol);
|
void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
|
void EmitLinkerOptions(ArrayRef<std::string> Options) override;
|
||||||
virtual void EmitLinkerOptions(ArrayRef<std::string> Options);
|
void EmitDataRegion(MCDataRegionType Kind) override;
|
||||||
virtual void EmitDataRegion(MCDataRegionType Kind);
|
void EmitThumbFunc(MCSymbol *Func) override;
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func);
|
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
|
||||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
|
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
unsigned ByteAlignment) override;
|
||||||
unsigned ByteAlignment);
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {
|
||||||
virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) {
|
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
virtual void EmitCOFFSymbolStorageClass(int StorageClass) {
|
void EmitCOFFSymbolStorageClass(int StorageClass) override {
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
virtual void EmitCOFFSymbolType(int Type) {
|
void EmitCOFFSymbolType(int Type) override {
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
virtual void EndCOFFSymbolDef() {
|
void EndCOFFSymbolDef() override {
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {
|
void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) override {
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||||
uint64_t Size = 0, unsigned ByteAlignment = 0);
|
uint64_t Size = 0, unsigned ByteAlignment = 0) override;
|
||||||
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size, unsigned ByteAlignment = 0);
|
uint64_t Size, unsigned ByteAlignment = 0) override;
|
||||||
|
|
||||||
virtual void EmitFileDirective(StringRef Filename) {
|
void EmitFileDirective(StringRef Filename) override {
|
||||||
// FIXME: Just ignore the .file; it isn't important enough to fail the
|
// FIXME: Just ignore the .file; it isn't important enough to fail the
|
||||||
// entire assembly.
|
// entire assembly.
|
||||||
|
|
||||||
// report_fatal_error("unsupported directive: '.file'");
|
// report_fatal_error("unsupported directive: '.file'");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EmitIdent(StringRef IdentString) {
|
void EmitIdent(StringRef IdentString) override {
|
||||||
llvm_unreachable("macho doesn't support this directive");
|
llvm_unreachable("macho doesn't support this directive");
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void FinishImpl();
|
void FinishImpl() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end anonymous namespace.
|
} // end anonymous namespace.
|
||||||
|
@ -24,83 +24,85 @@ namespace {
|
|||||||
/// @name MCStreamer Interface
|
/// @name MCStreamer Interface
|
||||||
/// @{
|
/// @{
|
||||||
|
|
||||||
virtual void ChangeSection(const MCSection *Section,
|
void ChangeSection(const MCSection *Section,
|
||||||
const MCExpr *Subsection) {
|
const MCExpr *Subsection) override {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EmitLabel(MCSymbol *Symbol) {
|
void EmitLabel(MCSymbol *Symbol) override {
|
||||||
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
|
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
|
||||||
assert(getCurrentSection().first &&"Cannot emit before setting section!");
|
assert(getCurrentSection().first &&"Cannot emit before setting section!");
|
||||||
AssignSection(Symbol, getCurrentSection().first);
|
AssignSection(Symbol, getCurrentSection().first);
|
||||||
}
|
}
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol) {
|
void EmitDebugLabel(MCSymbol *Symbol) override {
|
||||||
EmitLabel(Symbol);
|
EmitLabel(Symbol);
|
||||||
}
|
}
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
|
void EmitAssemblerFlag(MCAssemblerFlag Flag) override {}
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func) {}
|
void EmitThumbFunc(MCSymbol *Func) override {}
|
||||||
|
|
||||||
virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {}
|
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override {}
|
||||||
virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol){}
|
void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override {}
|
||||||
virtual void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
|
void EmitDwarfAdvanceLineAddr(int64_t LineDelta,
|
||||||
const MCSymbol *LastLabel,
|
const MCSymbol *LastLabel,
|
||||||
const MCSymbol *Label,
|
const MCSymbol *Label,
|
||||||
unsigned PointerSize) {}
|
unsigned PointerSize) override {}
|
||||||
|
|
||||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){
|
bool EmitSymbolAttribute(MCSymbol *Symbol,
|
||||||
|
MCSymbolAttr Attribute) override {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
|
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override {}
|
||||||
|
|
||||||
virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) {}
|
void BeginCOFFSymbolDef(const MCSymbol *Symbol) override {}
|
||||||
virtual void EmitCOFFSymbolStorageClass(int StorageClass) {}
|
void EmitCOFFSymbolStorageClass(int StorageClass) override {}
|
||||||
virtual void EmitCOFFSymbolType(int Type) {}
|
void EmitCOFFSymbolType(int Type) override {}
|
||||||
virtual void EndCOFFSymbolDef() {}
|
void EndCOFFSymbolDef() override {}
|
||||||
virtual void EmitCOFFSecRel32(MCSymbol const *Symbol) {}
|
void EmitCOFFSecRel32(MCSymbol const *Symbol) override {}
|
||||||
|
|
||||||
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {}
|
void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) override {}
|
||||||
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment) {}
|
unsigned ByteAlignment) override {}
|
||||||
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment) {}
|
unsigned ByteAlignment) override {}
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
|
||||||
uint64_t Size = 0, unsigned ByteAlignment = 0) {}
|
uint64_t Size = 0, unsigned ByteAlignment = 0) override {}
|
||||||
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size, unsigned ByteAlignment) {}
|
uint64_t Size, unsigned ByteAlignment) override {}
|
||||||
virtual void EmitBytes(StringRef Data) {}
|
void EmitBytes(StringRef Data) override {}
|
||||||
|
|
||||||
virtual void EmitValueImpl(const MCExpr *Value, unsigned Size) {}
|
void EmitValueImpl(const MCExpr *Value, unsigned Size) override {}
|
||||||
virtual void EmitULEB128Value(const MCExpr *Value) {}
|
void EmitULEB128Value(const MCExpr *Value) override {}
|
||||||
virtual void EmitSLEB128Value(const MCExpr *Value) {}
|
void EmitSLEB128Value(const MCExpr *Value) override {}
|
||||||
virtual void EmitGPRel32Value(const MCExpr *Value) {}
|
void EmitGPRel32Value(const MCExpr *Value) override {}
|
||||||
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
|
void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
|
||||||
unsigned ValueSize = 1,
|
unsigned ValueSize = 1,
|
||||||
unsigned MaxBytesToEmit = 0) {}
|
unsigned MaxBytesToEmit = 0) override {}
|
||||||
|
|
||||||
virtual void EmitCodeAlignment(unsigned ByteAlignment,
|
void EmitCodeAlignment(unsigned ByteAlignment,
|
||||||
unsigned MaxBytesToEmit = 0) {}
|
unsigned MaxBytesToEmit = 0) override {}
|
||||||
|
|
||||||
virtual bool EmitValueToOffset(const MCExpr *Offset,
|
bool EmitValueToOffset(const MCExpr *Offset,
|
||||||
unsigned char Value = 0) { return false; }
|
unsigned char Value = 0) override { return false; }
|
||||||
|
|
||||||
virtual void EmitFileDirective(StringRef Filename) {}
|
void EmitFileDirective(StringRef Filename) override {}
|
||||||
virtual bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
|
bool EmitDwarfFileDirective(unsigned FileNo, StringRef Directory,
|
||||||
StringRef Filename, unsigned CUID = 0) {
|
StringRef Filename,
|
||||||
|
unsigned CUID = 0) override {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
void EmitDwarfLocDirective(unsigned FileNo, unsigned Line,
|
||||||
unsigned Column, unsigned Flags,
|
unsigned Column, unsigned Flags,
|
||||||
unsigned Isa, unsigned Discriminator,
|
unsigned Isa, unsigned Discriminator,
|
||||||
StringRef FileName) {}
|
StringRef FileName) override {}
|
||||||
virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo&) {}
|
void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo&) override {}
|
||||||
|
|
||||||
virtual void EmitBundleAlignMode(unsigned AlignPow2) {}
|
void EmitBundleAlignMode(unsigned AlignPow2) override {}
|
||||||
virtual void EmitBundleLock(bool AlignToEnd) {}
|
void EmitBundleLock(bool AlignToEnd) override {}
|
||||||
virtual void EmitBundleUnlock() {}
|
void EmitBundleUnlock() override {}
|
||||||
|
|
||||||
virtual void FinishImpl() {}
|
void FinishImpl() override {}
|
||||||
|
|
||||||
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
|
void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override {
|
||||||
RecordProcEnd(Frame);
|
RecordProcEnd(Frame);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -167,16 +167,14 @@ public:
|
|||||||
|
|
||||||
// MCObjectWriter interface implementation.
|
// MCObjectWriter interface implementation.
|
||||||
|
|
||||||
void ExecutePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout);
|
void ExecutePostLayoutBinding(MCAssembler &Asm,
|
||||||
|
const MCAsmLayout &Layout) override;
|
||||||
|
|
||||||
void RecordRelocation(const MCAssembler &Asm,
|
void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
|
||||||
const MCAsmLayout &Layout,
|
const MCFragment *Fragment, const MCFixup &Fixup,
|
||||||
const MCFragment *Fragment,
|
MCValue Target, uint64_t &FixedValue) override;
|
||||||
const MCFixup &Fixup,
|
|
||||||
MCValue Target,
|
|
||||||
uint64_t &FixedValue);
|
|
||||||
|
|
||||||
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout);
|
void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,35 +50,35 @@ public:
|
|||||||
|
|
||||||
// MCStreamer interface
|
// MCStreamer interface
|
||||||
|
|
||||||
virtual void InitSections();
|
void InitSections() override;
|
||||||
virtual void EmitLabel(MCSymbol *Symbol);
|
void EmitLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitDebugLabel(MCSymbol *Symbol);
|
void EmitDebugLabel(MCSymbol *Symbol) override;
|
||||||
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag);
|
void EmitAssemblerFlag(MCAssemblerFlag Flag) override;
|
||||||
virtual void EmitThumbFunc(MCSymbol *Func);
|
void EmitThumbFunc(MCSymbol *Func) override;
|
||||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute);
|
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
|
||||||
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue);
|
void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
|
||||||
virtual void BeginCOFFSymbolDef(MCSymbol const *Symbol);
|
void BeginCOFFSymbolDef(MCSymbol const *Symbol) override;
|
||||||
virtual void EmitCOFFSymbolStorageClass(int StorageClass);
|
void EmitCOFFSymbolStorageClass(int StorageClass) override;
|
||||||
virtual void EmitCOFFSymbolType(int Type);
|
void EmitCOFFSymbolType(int Type) override;
|
||||||
virtual void EndCOFFSymbolDef();
|
void EndCOFFSymbolDef() override;
|
||||||
virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol);
|
void EmitCOFFSectionIndex(MCSymbol const *Symbol) override;
|
||||||
virtual void EmitCOFFSecRel32(MCSymbol const *Symbol);
|
void EmitCOFFSecRel32(MCSymbol const *Symbol) override;
|
||||||
virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value);
|
void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) override;
|
||||||
virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
|
||||||
unsigned ByteAlignment);
|
unsigned ByteAlignment) override;
|
||||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
|
void EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size,unsigned ByteAlignment);
|
uint64_t Size,unsigned ByteAlignment) override;
|
||||||
virtual void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
void EmitTBSSSymbol(const MCSection *Section, MCSymbol *Symbol,
|
||||||
uint64_t Size, unsigned ByteAlignment);
|
uint64_t Size, unsigned ByteAlignment) override;
|
||||||
virtual void EmitFileDirective(StringRef Filename);
|
void EmitFileDirective(StringRef Filename) override;
|
||||||
virtual void EmitIdent(StringRef IdentString);
|
void EmitIdent(StringRef IdentString) override;
|
||||||
virtual void EmitWin64EHHandlerData();
|
void EmitWin64EHHandlerData() override;
|
||||||
virtual void FinishImpl();
|
void FinishImpl() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI) {
|
void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI) override {
|
||||||
MCDataFragment *DF = getOrCreateDataFragment();
|
MCDataFragment *DF = getOrCreateDataFragment();
|
||||||
|
|
||||||
SmallVector<MCFixup, 4> Fixups;
|
SmallVector<MCFixup, 4> Fixups;
|
||||||
|
Loading…
Reference in New Issue
Block a user