#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCSymbol.h"
-#include "llvm/MC/MCValue.h"
using namespace llvm;
CurSection = Section;
}
- virtual void EmitLabel(MCSymbol *Symbol) {}
+ virtual void EmitLabel(MCSymbol *Symbol) {
+ assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
+ assert(CurSection && "Cannot emit before setting section!");
+ Symbol->setSection(*CurSection);
+ }
- virtual void EmitAssemblerFlag(AssemblerFlag Flag) {}
+ virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
- virtual void EmitAssignment(MCSymbol *Symbol, const MCValue &Value,
- bool MakeAbsolute = false) {}
+ virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {}
- virtual void EmitSymbolAttribute(MCSymbol *Symbol, SymbolAttr Attribute) {}
+ virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute){}
virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {}
- virtual void EmitLocalSymbol(MCSymbol *Symbol, const MCValue &Value) {}
+ virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol) {}
+ virtual void EmitCOFFSymbolStorageClass(int StorageClass) {}
+ virtual void EmitCOFFSymbolType(int Type) {}
+ virtual void EndCOFFSymbolDef() {}
- virtual void EmitCommonSymbol(MCSymbol *Symbol, unsigned Size,
- unsigned Pow2Alignment) {}
+ virtual void EmitELFSize(MCSymbol *Symbol, const MCExpr *Value) {}
+ virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
+ unsigned ByteAlignment) {}
+ virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) {}
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol = 0,
- unsigned Size = 0, unsigned Pow2Alignment = 0) {}
-
- virtual void EmitBytes(const StringRef &Data) {}
+ unsigned Size = 0, unsigned ByteAlignment = 0) {}
- virtual void EmitValue(const MCValue &Value, unsigned Size) {}
+ virtual void EmitBytes(StringRef Data, unsigned AddrSpace) {}
+ virtual void EmitValue(const MCExpr *Value, unsigned Size,
+ unsigned AddrSpace) {}
+ virtual void EmitGPRel32Value(const MCExpr *Value) {}
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0,
unsigned ValueSize = 1,
unsigned MaxBytesToEmit = 0) {}
- virtual void EmitValueToOffset(const MCValue &Offset,
+ virtual void EmitCodeAlignment(unsigned ByteAlignment,
+ unsigned MaxBytesToEmit = 0) {}
+
+ virtual void EmitValueToOffset(const MCExpr *Offset,
unsigned char Value = 0) {}
+ virtual void EmitFileDirective(StringRef Filename) {}
+ virtual void EmitDwarfFileDirective(unsigned FileNo,StringRef Filename) {}
virtual void EmitInstruction(const MCInst &Inst) {}
virtual void Finish() {}