summaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
index 09f7496cd4ef5..90929a217368e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
+++ b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
@@ -30,8 +30,9 @@ class ByteStreamer {
public:
// For now we're just handling the calls we need for dwarf emission/hashing.
virtual void EmitInt8(uint8_t Byte, const Twine &Comment = "") = 0;
- virtual void EmitSLEB128(uint64_t DWord, const Twine &Comment = "") = 0;
- 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 emitULEB128(uint64_t DWord, const Twine &Comment = "",
+ unsigned PadTo = 0) = 0;
};
class APByteStreamer final : public ByteStreamer {
@@ -44,13 +45,14 @@ public:
AP.OutStreamer->AddComment(Comment);
AP.emitInt8(Byte);
}
- void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
+ void emitSLEB128(uint64_t DWord, const Twine &Comment) override {
AP.OutStreamer->AddComment(Comment);
- AP.EmitSLEB128(DWord);
+ AP.emitSLEB128(DWord);
}
- void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override {
+ void emitULEB128(uint64_t DWord, const Twine &Comment,
+ unsigned PadTo) override {
AP.OutStreamer->AddComment(Comment);
- AP.EmitULEB128(DWord);
+ AP.emitULEB128(DWord, nullptr, PadTo);
}
};
@@ -62,10 +64,11 @@ class HashingByteStreamer final : public ByteStreamer {
void EmitInt8(uint8_t Byte, const Twine &Comment) override {
Hash.update(Byte);
}
- void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
+ void emitSLEB128(uint64_t DWord, const Twine &Comment) override {
Hash.addSLEB128(DWord);
}
- void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override {
+ void emitULEB128(uint64_t DWord, const Twine &Comment,
+ unsigned PadTo) override {
Hash.addULEB128(DWord);
}
};
@@ -90,7 +93,7 @@ public:
if (GenerateComments)
Comments.push_back(Comment.str());
}
- void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
+ void emitSLEB128(uint64_t DWord, const Twine &Comment) override {
raw_svector_ostream OSE(Buffer);
unsigned Length = encodeSLEB128(DWord, OSE);
if (GenerateComments) {
@@ -102,7 +105,8 @@ public:
}
}
- void EmitULEB128(uint64_t DWord, const Twine &Comment, unsigned PadTo) override {
+ void emitULEB128(uint64_t DWord, const Twine &Comment,
+ unsigned PadTo) override {
raw_svector_ostream OSE(Buffer);
unsigned Length = encodeULEB128(DWord, OSE, PadTo);
if (GenerateComments) {