10 #ifndef LLVM_MC_MCOBJECTWRITER_H
11 #define LLVM_MC_MCOBJECTWRITER_H
28 class MCSymbolRefExpr;
50 : OS(&OS), IsLittleEndian(IsLittleEndian) {}
89 uint64_t &FixedValue) = 0;
171 const char Zeros[16] = {0};
173 for (
unsigned i = 0, e = N / 16; i != e; ++i)
180 unsigned ZeroFillSize = 0) {
188 (ZeroFillSize == 0 || Str.
size() <= ZeroFillSize) &&
189 "data size greater than fill size, unexpected large write will occur");
200 #endif // LLVM_MC_MCOBJECTWRITER_H
void WriteZeros(unsigned N)
raw_pwrite_stream & getStream()
void write64(uint64_t Value)
This represents an "assembler immediate".
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
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...
virtual void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout)=0
Write the object file.
void writeLE64(uint64_t Value)
MCObjectWriter(raw_pwrite_stream &OS, bool IsLittleEndian)
Defines the object file and target independent interfaces used by the assembler backend to write nati...
void write8(uint8_t Value)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
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.
Encapsulates the layout of an assembly file at a particular point in time.
void writeBE16(uint16_t Value)
Represent a reference to a symbol from inside an expression.
uint64_t tell() const
tell - Return the current offset with the file.
void writeBE64(uint64_t Value)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
void write32(uint32_t Value)
virtual ~MCObjectWriter()
void write(ArrayRef< value_type > Vals)
virtual bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, const MCSymbol &A, const MCSymbol &B, bool InSet) const
virtual void reset()
lifetime management
unsigned getInitialOffset()
void setStream(raw_pwrite_stream &NewOS)
void write16(uint16_t Value)
MCObjectWriter & operator=(const MCObjectWriter &)=delete
virtual void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue)=0
Record a relocation entry.
Target - Wrapper for Target specific information.
void writeBE32(uint32_t Value)
void writeLE32(uint32_t Value)
void writeLE16(uint16_t Value)
pointer data()
Return a pointer to the vector's buffer, even if empty().
bool isLittleEndian() const
LLVM_ATTRIBUTE_ALWAYS_INLINE size_type size() const
void writeBytes(const SmallVectorImpl< char > &ByteVec, unsigned ZeroFillSize=0)
An abstract base class for streams implementations that also support a pwrite operation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
void writeBytes(StringRef Str, unsigned ZeroFillSize=0)