14 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_BYTESTREAMER_H 15 #define LLVM_LIB_CODEGEN_ASMPRINTER_BYTESTREAMER_H 32 virtual void EmitInt8(uint8_t Byte,
const Twine &Comment =
"") = 0;
34 virtual void EmitULEB128(uint64_t DWord,
const Twine &Comment =
"",
unsigned PadTo = 0) = 0;
76 std::vector<std::string> &Comments;
85 std::vector<std::string> &Comments,
bool GenerateComments)
86 : Buffer(Buffer), Comments(Comments), GenerateComments(GenerateComments) {
91 Comments.push_back(Comment.
str());
96 if (GenerateComments) {
97 Comments.push_back(Comment.
str());
100 for (
size_t i = 1; i < Length; ++i)
101 Comments.push_back(
"");
108 if (GenerateComments) {
109 Comments.push_back(Comment.
str());
112 for (
size_t i = 1; i < Length; ++i)
113 Comments.push_back(
"");
An object containing the capability of hashing and adding hash attributes onto a DIE.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
This class represents lattice values for constants.
void EmitSLEB128(uint64_t DWord, const Twine &Comment) override
void EmitInt8(uint8_t Byte, const Twine &Comment) override
void push_back(const T &Elt)
void addULEB128(uint64_t Value)
Encodes and adds.
void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
A raw_ostream that writes to an SmallVector or SmallString.
void EmitInt8(uint8_t Byte, const Twine &Comment) override
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
virtual void EmitInt8(uint8_t Byte, const Twine &Comment="")=0
BufferByteStreamer(SmallVectorImpl< char > &Buffer, std::vector< std::string > &Comments, bool GenerateComments)
void EmitSLEB128(uint64_t DWord, const Twine &Comment) override
void EmitSLEB128(uint64_t DWord, const Twine &Comment) override
void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override
void EmitULEB128(uint64_t Value, const char *Desc=nullptr, unsigned PadTo=0) const
Emit the specified unsigned leb128 value.
HashingByteStreamer(DIEHash &H)
This class is intended to be used as a driving class for all asm writers.
virtual void EmitULEB128(uint64_t DWord, const Twine &Comment="", unsigned PadTo=0)=0
void EmitSLEB128(int64_t Value, const char *Desc=nullptr) const
Emit the specified signed leb128 value.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
virtual void EmitSLEB128(uint64_t DWord, const Twine &Comment="")=0
void update(uint8_t Value)
Adds.
void EmitInt8(uint8_t Byte, const Twine &Comment) override
void addSLEB128(int64_t Value)
Encodes and adds.
std::string str() const
Return the twine contents as a std::string.
const bool GenerateComments
Only verbose textual output needs comments.
void emitInt8(int Value) const
Emit a byte directive and value.
APByteStreamer(AsmPrinter &Asm)