[llvm] 7684496 - [AsmPrinter] Rename ByteStreamer::EmitInt8 to emitInt8
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 20:03:03 PST 2020
Author: Fangrui Song
Date: 2020-11-06T20:02:56-08:00
New Revision: 76844960351b712ed7191dca1a0cb920153586d6
URL: https://github.com/llvm/llvm-project/commit/76844960351b712ed7191dca1a0cb920153586d6
DIFF: https://github.com/llvm/llvm-project/commit/76844960351b712ed7191dca1a0cb920153586d6.diff
LOG: [AsmPrinter] Rename ByteStreamer::EmitInt8 to emitInt8
to be consistent with other emit*
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
index 90929a217368..5e7db1f2f76c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
+++ b/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h
@@ -29,7 +29,7 @@ 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 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;
@@ -41,7 +41,7 @@ class APByteStreamer final : public ByteStreamer {
public:
APByteStreamer(AsmPrinter &Asm) : AP(Asm) {}
- void EmitInt8(uint8_t Byte, const Twine &Comment) override {
+ void emitInt8(uint8_t Byte, const Twine &Comment) override {
AP.OutStreamer->AddComment(Comment);
AP.emitInt8(Byte);
}
@@ -61,7 +61,7 @@ class HashingByteStreamer final : public ByteStreamer {
DIEHash &Hash;
public:
HashingByteStreamer(DIEHash &H) : Hash(H) {}
- void EmitInt8(uint8_t Byte, const Twine &Comment) override {
+ void emitInt8(uint8_t Byte, const Twine &Comment) override {
Hash.update(Byte);
}
void emitSLEB128(uint64_t DWord, const Twine &Comment) override {
@@ -88,7 +88,7 @@ class BufferByteStreamer final : public ByteStreamer {
std::vector<std::string> &Comments, bool GenerateComments)
: Buffer(Buffer), Comments(Comments), GenerateComments(GenerateComments) {
}
- void EmitInt8(uint8_t Byte, const Twine &Comment) override {
+ void emitInt8(uint8_t Byte, const Twine &Comment) override {
Buffer.push_back(Byte);
if (GenerateComments)
Comments.push_back(Comment.str());
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 417ad0fb833b..46c4ed223509 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -158,7 +158,7 @@ static cl::opt<LinkageNameOption>
static constexpr unsigned ULEB128PadSize = 4;
void DebugLocDwarfExpression::emitOp(uint8_t Op, const char *Comment) {
- getActiveStreamer().EmitInt8(
+ getActiveStreamer().emitInt8(
Op, Comment ? Twine(Comment) + " " + dwarf::OperationEncodingString(Op)
: dwarf::OperationEncodingString(Op));
}
@@ -172,7 +172,7 @@ void DebugLocDwarfExpression::emitUnsigned(uint64_t Value) {
}
void DebugLocDwarfExpression::emitData1(uint8_t Value) {
- getActiveStreamer().EmitInt8(Value, Twine(Value));
+ getActiveStreamer().emitInt8(Value, Twine(Value));
}
void DebugLocDwarfExpression::emitBaseTypeRef(uint64_t Idx) {
@@ -206,7 +206,7 @@ void DebugLocDwarfExpression::commitTemporaryBuffer() {
const char *Comment = (Byte.index() < TmpBuf->Comments.size())
? TmpBuf->Comments[Byte.index()].c_str()
: "";
- OutBS.EmitInt8(Byte.value(), Comment);
+ OutBS.emitInt8(Byte.value(), Comment);
}
TmpBuf->Bytes.clear();
TmpBuf->Comments.clear();
@@ -2417,7 +2417,7 @@ void DwarfDebug::emitDebugLocEntry(ByteStreamer &Streamer,
for (auto &Op : Expr) {
assert(Op.getCode() != dwarf::DW_OP_const_type &&
"3 operand ops not yet supported");
- Streamer.EmitInt8(Op.getCode(), Comment != End ? *(Comment++) : "");
+ Streamer.emitInt8(Op.getCode(), Comment != End ? *(Comment++) : "");
Offset++;
for (unsigned I = 0; I < 2; ++I) {
if (Op.getDescription().Op[I] == Encoding::SizeNA)
@@ -2433,7 +2433,7 @@ void DwarfDebug::emitDebugLocEntry(ByteStreamer &Streamer,
Comment++;
} else {
for (uint64_t J = Offset; J < Op.getOperandEndOffset(I); ++J)
- Streamer.EmitInt8(Data.getData()[J], Comment != End ? *(Comment++) : "");
+ Streamer.emitInt8(Data.getData()[J], Comment != End ? *(Comment++) : "");
}
Offset = Op.getOperandEndOffset(I);
}
More information about the llvm-commits
mailing list