14#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_BYTESTREAMER_H
15#define LLVM_LIB_CODEGEN_ASMPRINTER_BYTESTREAMER_H
35 unsigned PadTo = 0) = 0;
54 unsigned PadTo)
override {
81 unsigned PadTo)
override {
93 std::vector<std::string> &Comments;
108 Comments.push_back(Comment.str());
114 Comments.push_back(Comment.str());
117 for (
size_t i = 1; i <
Length; ++i)
118 Comments.push_back(
"");
123 unsigned PadTo)
override {
127 Comments.push_back(Comment.str());
130 for (
size_t i = 1; i <
Length; ++i)
131 Comments.push_back(
"");
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static constexpr unsigned ULEB128PadSize
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned emitDIERef(const DIE &D) override
APByteStreamer(AsmPrinter &Asm)
void emitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
void emitSLEB128(uint64_t DWord, const Twine &Comment) override
void emitInt8(uint8_t Byte, const Twine &Comment) override
This class is intended to be used as a driving class for all asm writers.
void emitULEB128(uint64_t Value, const char *Desc=nullptr, unsigned PadTo=0) const
Emit the specified unsigned leb128 value.
void emitInt8(int Value) const
Emit a byte directive and value.
void emitSLEB128(int64_t Value, const char *Desc=nullptr) const
Emit the specified signed leb128 value.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
void emitInt8(uint8_t Byte, const Twine &Comment) override
unsigned emitDIERef(const DIE &D) override
void emitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
void emitSLEB128(uint64_t DWord, const Twine &Comment) override
const bool GenerateComments
Only verbose textual output needs comments.
BufferByteStreamer(SmallVectorImpl< char > &Buffer, std::vector< std::string > &Comments, bool GenerateComments)
virtual void emitULEB128(uint64_t DWord, const Twine &Comment="", unsigned PadTo=0)=0
virtual void emitSLEB128(uint64_t DWord, const Twine &Comment="")=0
virtual void emitInt8(uint8_t Byte, const Twine &Comment="")=0
virtual unsigned emitDIERef(const DIE &D)=0
ByteStreamer(const ByteStreamer &)=default
An object containing the capability of hashing and adding hash attributes onto a DIE.
void update(uint8_t Value)
Adds.
void hashRawTypeReference(const DIE &Entry)
void addSLEB128(int64_t Value)
Encodes and adds.
void addULEB128(uint64_t Value)
Encodes and adds.
A structured debug information entry.
HashingByteStreamer(DIEHash &H)
void emitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
void emitSLEB128(uint64_t DWord, const Twine &Comment) override
void emitInt8(uint8_t Byte, const Twine &Comment) override
unsigned emitDIERef(const DIE &D) override
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
A raw_ostream that writes to an SmallVector or SmallString.
This is an optimization pass for GlobalISel generic memory operations.
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.