10 #ifndef LLVM_MC_MCOBJECTWRITER_H
11 #define LLVM_MC_MCOBJECTWRITER_H
15 #include "llvm/Support/DataTypes.h"
25 class MCSymbolRefExpr;
83 uint64_t &FixedValue) = 0;
120 Write8(uint8_t(Value >> 0));
121 Write8(uint8_t(Value >> 8));
135 Write8(uint8_t(Value >> 8));
136 Write8(uint8_t(Value >> 0));
171 const char Zeros[16] = { 0 };
173 for (
unsigned i = 0, e = N / 16; i != e; ++i)
186 assert((ZeroFillSize == 0 || Str.
size () <= ZeroFillSize) &&
187 "data size greater than fill size, unexpected large write will occur");
void WriteZeros(unsigned N)
raw_ostream & getStream()
size_t size() const
size - Get the string size.
void WriteLE16(uint16_t Value)
void WriteBE64(uint64_t Value)
void Write32(uint32_t Value)
void WriteBytes(const SmallVectorImpl< char > &ByteVec, unsigned ZeroFillSize=0)
void WriteBytes(StringRef Str, unsigned ZeroFillSize=0)
bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm, const MCSymbolRefExpr *A, const MCSymbolRefExpr *B, bool InSet) const
Check whether the difference (A - B) between two symbol references is fully resolved.
virtual bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, const MCSymbolData &DataA, const MCFragment &FB, bool InSet, bool IsPCRel) const
void WriteLE64(uint64_t Value)
virtual ~MCObjectWriter()
void WriteBE16(uint16_t Value)
void Write8(uint8_t Value)
virtual void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue)=0
Record a relocation entry.
void WriteLE32(uint32_t Value)
virtual void reset()
lifetime management
virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout)=0
Write the object file.
MCObjectWriter(raw_ostream &_OS, bool _IsLittleEndian)
virtual void ExecutePostLayoutBinding(MCAssembler &Asm, const MCAsmLayout &Layout)=0
Perform any late binding of symbols (for example, to assign symbol indices for use when generating re...
void Write64(uint64_t Value)
void WriteBE32(uint32_t Value)
void Write16(uint16_t Value)
#define LLVM_DELETED_FUNCTION
pointer data()
data - Return a pointer to the vector's buffer, even if empty().
bool isLittleEndian() const
LLVM Value Representation.