2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void ARMTargetStreamer::emitInst(uint32_t Inst, char Suffix) {
default:
llvm_unreachable("Invalid Suffix");
}
getStreamer().EmitBytes(StringRef(Buffer, Size));
getStreamer().emitBytes(StringRef(Buffer, Size));
}

// The remaining callbacks should be handled separately by each
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void UnwindOpcodeAssembler::EmitSPOffset(int64_t Offset) {
uint8_t Buff[16];
Buff[0] = ARM::EHABI::UNWIND_OPCODE_INC_VSP_ULEB128;
size_t ULEBSize = encodeULEB128((Offset - 0x204) >> 2, Buff + 1);
EmitBytes(Buff, ULEBSize + 1);
emitBytes(Buff, ULEBSize + 1);
} else if (Offset > 0) {
if (Offset > 0x100) {
EmitInt8(ARM::EHABI::UNWIND_OPCODE_INC_VSP | 0x3fu);
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UnwindOpcodeAssembler {
OpBegins.push_back(OpBegins.back() + Opcodes.size());
}

/// Finalize the unwind opcode sequence for EmitBytes()
/// Finalize the unwind opcode sequence for emitBytes()
void Finalize(unsigned &PersonalityIndex,
SmallVectorImpl<uint8_t> &Result);

Expand All @@ -80,7 +80,7 @@ class UnwindOpcodeAssembler {
OpBegins.push_back(OpBegins.back() + 2);
}

void EmitBytes(const uint8_t *Opcode, size_t Size) {
void emitBytes(const uint8_t *Opcode, size_t Size) {
Ops.insert(Ops.end(), Opcode, Opcode + Size);
OpBegins.push_back(OpBegins.back() + Size);
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class ARMWinCOFFStreamer : public MCWinCOFFStreamer {
std::unique_ptr<MCObjectWriter> OW)
: MCWinCOFFStreamer(C, std::move(AB), std::move(CE), std::move(OW)) {}

void EmitThumbFunc(MCSymbol *Symbol) override;
void emitThumbFunc(MCSymbol *Symbol) override;
void FinishImpl() override;
};

void ARMWinCOFFStreamer::EmitThumbFunc(MCSymbol *Symbol) {
void ARMWinCOFFStreamer::emitThumbFunc(MCSymbol *Symbol) {
getAssembler().setIsThumbFunc(Symbol);
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ void AVRTargetStreamer::finish() {

OS.emitRawComment(" Declaring this symbol tells the CRT that it should");
OS.emitRawComment("copy all variables from program memory to RAM on startup");
OS.EmitSymbolAttribute(DoCopyData, MCSA_Global);
OS.emitSymbolAttribute(DoCopyData, MCSA_Global);

OS.emitRawComment(" Declaring this symbol tells the CRT that it should");
OS.emitRawComment("clear the zeroed data section on startup");
OS.EmitSymbolAttribute(DoClearBss, MCSA_Global);
OS.emitSymbolAttribute(DoClearBss, MCSA_Global);
}

} // end namespace llvm
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/BPF/BTFDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,8 @@ void BTFDebug::emitBTFSection() {
uint32_t StringOffset = 0;
for (const auto &S : StringTable.getTable()) {
OS.AddComment("string offset=" + std::to_string(StringOffset));
OS.EmitBytes(S);
OS.EmitBytes(StringRef("\0", 1));
OS.emitBytes(S);
OS.emitBytes(StringRef("\0", 1));
StringOffset += S.size() + 1;
}
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ int HexagonAsmParser::processInstruction(MCInst &Inst,
Sym = getContext().getOrCreateSymbol(StringRef(myCharStr.c_str() + 16));
if (Sym->isUndefined()) {
getStreamer().EmitLabel(Sym);
getStreamer().EmitSymbolAttribute(Sym, MCSA_Global);
getStreamer().emitSymbolAttribute(Sym, MCSA_Global);
getStreamer().EmitIntValue(Value, byteSize);
}
} else if (MO_1.isExpr()) {
Expand All @@ -1530,7 +1530,7 @@ int HexagonAsmParser::processInstruction(MCInst &Inst,
if (Sym->isUndefined()) {
// case where symbol is not yet defined: emit symbol
getStreamer().EmitLabel(Sym);
getStreamer().EmitSymbolAttribute(Sym, MCSA_Local);
getStreamer().emitSymbolAttribute(Sym, MCSA_Local);
getStreamer().EmitValue(MO_1.getExpr(), 4);
}
} else
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static MCSymbol *smallData(AsmPrinter &AP, const MachineInstr &MI,
Sym = AP.OutContext.getOrCreateSymbol(Twine(symbolName));
if (Sym->isUndefined()) {
OutStreamer.EmitLabel(Sym);
OutStreamer.EmitSymbolAttribute(Sym, MCSA_Global);
OutStreamer.emitSymbolAttribute(Sym, MCSA_Global);
OutStreamer.EmitIntValue(Value, AlignSize);
OutStreamer.EmitCodeAlignment(AlignSize);
}
Expand Down Expand Up @@ -235,7 +235,7 @@ static MCSymbol *smallData(AsmPrinter &AP, const MachineInstr &MI,
Sym = AP.OutContext.getOrCreateSymbol(Twine(LitaName));
if (Sym->isUndefined()) {
OutStreamer.EmitLabel(Sym);
OutStreamer.EmitSymbolAttribute(Sym, MCSA_Local);
OutStreamer.emitSymbolAttribute(Sym, MCSA_Local);
OutStreamer.EmitValue(Imm.getExpr(), AlignSize);
OutStreamer.EmitCodeAlignment(AlignSize);
}
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/Hexagon/HexagonTargetStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class HexagonTargetStreamer : public MCTargetStreamer {
virtual void EmitCodeAlignment(unsigned ByteAlignment,
unsigned MaxBytesToEmit = 0){};
virtual void emitFAlign(unsigned Size, unsigned MaxBytesToEmit){};
virtual void EmitCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
virtual void emitCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment,
unsigned AccessGranularity){};
virtual void EmitLocalCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
virtual void emitLocalCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlign,
unsigned AccessGranularity){};
};
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class HexagonTargetELFStreamer : public HexagonTargetStreamer {
}


void EmitCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
void emitCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment,
unsigned AccessSize) override {
HexagonMCELFStreamer &HexagonELFStreamer =
Expand All @@ -260,7 +260,7 @@ class HexagonTargetELFStreamer : public HexagonTargetStreamer {
AccessSize);
}

void EmitLocalCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
void emitLocalCommonSymbolSorted(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment,
unsigned AccessSize) override {
HexagonMCELFStreamer &HexagonELFStreamer =
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/MSP430/AsmParser/MSP430AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ bool MSP430AsmParser::ParseDirectiveRefSym(AsmToken DirectiveID) {
return TokError("expected identifier in directive");

MCSymbol *Sym = getContext().getOrCreateSymbol(Name);
getStreamer().EmitSymbolAttribute(Sym, MCSA_Global);
getStreamer().emitSymbolAttribute(Sym, MCSA_Global);
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/MSP430/MCTargetDesc/MSP430ELFStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MSP430TargetELFStreamer::MSP430TargetELFStreamer(MCStreamer &S,
// Subsection length.
Streamer.EmitIntValue(22, 4);
// Vendor name string, zero-terminated.
Streamer.EmitBytes("mspabi");
Streamer.emitBytes("mspabi");
Streamer.EmitIntValue(0, 1);

// Attribute vector scope tag. 1 stands for the entire file.
Expand Down
10 changes: 5 additions & 5 deletions llvm/lib/Target/Mips/MipsAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) {

// If we just ended a constant pool, mark it as such.
if (InConstantPool && Opc != Mips::CONSTPOOL_ENTRY) {
OutStreamer->EmitDataRegion(MCDR_DataRegionEnd);
OutStreamer->emitDataRegion(MCDR_DataRegionEnd);
InConstantPool = false;
}
if (Opc == Mips::CONSTPOOL_ENTRY) {
Expand All @@ -218,7 +218,7 @@ void MipsAsmPrinter::emitInstruction(const MachineInstr *MI) {

// If this is the first entry of the pool, mark it.
if (!InConstantPool) {
OutStreamer->EmitDataRegion(MCDR_DataRegion);
OutStreamer->emitDataRegion(MCDR_DataRegion);
InConstantPool = true;
}

Expand Down Expand Up @@ -462,7 +462,7 @@ void MipsAsmPrinter::emitFunctionBodyEnd() {
if (!InConstantPool)
return;
InConstantPool = false;
OutStreamer->EmitDataRegion(MCDR_DataRegionEnd);
OutStreamer->emitDataRegion(MCDR_DataRegionEnd);
}

void MipsAsmPrinter::emitBasicBlockEnd(const MachineBasicBlock &MBB) {
Expand Down Expand Up @@ -990,7 +990,7 @@ void MipsAsmPrinter::EmitFPCallStub(
//
// .global xxxx
//
OutStreamer->EmitSymbolAttribute(MSymbol, MCSA_Global);
OutStreamer->emitSymbolAttribute(MSymbol, MCSA_Global);
const char *RetType;
//
// make the comment field identifying the return and parameter
Expand Down Expand Up @@ -1073,7 +1073,7 @@ void MipsAsmPrinter::EmitFPCallStub(
TS.emitDirectiveEnt(*Stub);
MCSymbol *MType =
OutContext.getOrCreateSymbol("__call_stub_fp_" + Twine(Symbol));
OutStreamer->EmitSymbolAttribute(MType, MCSA_ELF_TypeFunction);
OutStreamer->emitSymbolAttribute(MType, MCSA_ELF_TypeFunction);
OutStreamer->EmitLabel(Stub);

// Only handle non-pic for now.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ void PPCLinuxAsmPrinter::emitStartOfAsmFile(Module &M) {
MCConstantExpr::create(0x8000, OutContext),
OutContext);

OutStreamer->EmitAssignment(TOCSym, tocExpr);
OutStreamer->emitAssignment(TOCSym, tocExpr);

OutStreamer->SwitchSection(getObjFileLowering().getTextSection());
}
Expand Down Expand Up @@ -1626,7 +1626,7 @@ void PPCAIXAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
OutStreamer->EmitXCOFFLocalCommonSymbol(
GVSym, Size, Csect->getQualNameSymbol(), Align);
else
OutStreamer->EmitCommonSymbol(Csect->getQualNameSymbol(), Size, Align);
OutStreamer->emitCommonSymbol(Csect->getQualNameSymbol(), Size, Align);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ class WebAssemblyAsmParser final : public MCTargetAsmParser {
std::string S;
if (Parser.parseEscapedString(S))
return error("Cannot parse string constant: ", Lexer.getTok());
Out.EmitBytes(StringRef(S.c_str(), S.length() + 1));
Out.emitBytes(StringRef(S.c_str(), S.length() + 1));
return expect(AsmToken::EndOfStatement, "EOL");
}

Expand Down
10 changes: 5 additions & 5 deletions llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void WebAssemblyAsmPrinter::emitEndOfAsmFile(Module &M) {
MCSectionWasm *MySection =
OutContext.getWasmSection(SectionName, SectionKind::getMetadata());
OutStreamer->SwitchSection(MySection);
OutStreamer->EmitBytes(Contents->getString());
OutStreamer->emitBytes(Contents->getString());
OutStreamer->PopSection();
}
}
Expand Down Expand Up @@ -214,13 +214,13 @@ void WebAssemblyAsmPrinter::EmitProducerInfo(Module &M) {
if (Producers.second->empty())
continue;
OutStreamer->emitULEB128IntValue(strlen(Producers.first));
OutStreamer->EmitBytes(Producers.first);
OutStreamer->emitBytes(Producers.first);
OutStreamer->emitULEB128IntValue(Producers.second->size());
for (auto &Producer : *Producers.second) {
OutStreamer->emitULEB128IntValue(Producer.first.size());
OutStreamer->EmitBytes(Producer.first);
OutStreamer->emitBytes(Producer.first);
OutStreamer->emitULEB128IntValue(Producer.second.size());
OutStreamer->EmitBytes(Producer.second);
OutStreamer->emitBytes(Producer.second);
}
}
OutStreamer->PopSection();
Expand Down Expand Up @@ -271,7 +271,7 @@ void WebAssemblyAsmPrinter::EmitTargetFeatures(Module &M) {
for (auto &F : EmittedFeatures) {
OutStreamer->EmitIntValue(F.Prefix, 1);
OutStreamer->emitULEB128IntValue(F.Name.size());
OutStreamer->EmitBytes(F.Name);
OutStreamer->emitBytes(F.Name);
}

OutStreamer->PopSection();
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3752,27 +3752,27 @@ bool X86AsmParser::ParseDirectiveCode(StringRef IDVal, SMLoc L) {
Parser.Lex();
if (!is16BitMode()) {
SwitchMode(X86::Mode16Bit);
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code16);
getParser().getStreamer().emitAssemblerFlag(MCAF_Code16);
}
} else if (IDVal == ".code16gcc") {
// .code16gcc parses as if in 32-bit mode, but emits code in 16-bit mode.
Parser.Lex();
Code16GCC = true;
if (!is16BitMode()) {
SwitchMode(X86::Mode16Bit);
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code16);
getParser().getStreamer().emitAssemblerFlag(MCAF_Code16);
}
} else if (IDVal == ".code32") {
Parser.Lex();
if (!is32BitMode()) {
SwitchMode(X86::Mode32Bit);
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code32);
getParser().getStreamer().emitAssemblerFlag(MCAF_Code32);
}
} else if (IDVal == ".code64") {
Parser.Lex();
if (!is64BitMode()) {
SwitchMode(X86::Mode64Bit);
getParser().getStreamer().EmitAssemblerFlag(MCAF_Code64);
getParser().getStreamer().emitAssemblerFlag(MCAF_Code64);
}
} else {
Error(L, "unknown directive " + IDVal);
Expand Down
14 changes: 7 additions & 7 deletions llvm/lib/Target/X86/X86AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
OutStreamer->EmitIntValue(4, 4 /*size*/); // data size for "GNU\0"
OutStreamer->EmitIntValue(8 + WordSize, 4 /*size*/); // Elf_Prop size
OutStreamer->EmitIntValue(ELF::NT_GNU_PROPERTY_TYPE_0, 4 /*size*/);
OutStreamer->EmitBytes(StringRef("GNU", 4)); // note name
OutStreamer->emitBytes(StringRef("GNU", 4)); // note name

// Emitting an Elf_Prop for the CET properties.
OutStreamer->EmitIntValue(ELF::GNU_PROPERTY_X86_FEATURE_1_AND, 4);
Expand Down Expand Up @@ -639,8 +639,8 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
if (M.getModuleFlag("cfguard"))
Feat00Flags |= 0x800; // Object is CFG-aware.

OutStreamer->EmitSymbolAttribute(S, MCSA_Global);
OutStreamer->EmitAssignment(
OutStreamer->emitSymbolAttribute(S, MCSA_Global);
OutStreamer->emitAssignment(
S, MCConstantExpr::create(Feat00Flags, MMI->getContext()));
}
OutStreamer->EmitSyntaxDirective();
Expand All @@ -649,7 +649,7 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
// mode prefix assembly with .code16.
bool is16 = TT.getEnvironment() == Triple::CODE16;
if (M.getModuleInlineAsm().empty() && is16)
OutStreamer->EmitAssemblerFlag(MCAF_Code16);
OutStreamer->emitAssemblerFlag(MCAF_Code16);
}

static void
Expand All @@ -658,7 +658,7 @@ emitNonLazySymbolPointer(MCStreamer &OutStreamer, MCSymbol *StubLabel,
// L_foo$stub:
OutStreamer.EmitLabel(StubLabel);
// .indirect_symbol _foo
OutStreamer.EmitSymbolAttribute(MCSym.getPointer(), MCSA_IndirectSymbol);
OutStreamer.emitSymbolAttribute(MCSym.getPointer(), MCSA_IndirectSymbol);

if (MCSym.getInt())
// External to current translation unit.
Expand Down Expand Up @@ -715,7 +715,7 @@ void X86AsmPrinter::emitEndOfAsmFile(Module &M) {
// points). If this doesn't occur, the linker can safely perform dead code
// stripping. Since LLVM never generates code that does this, it is always
// safe to set.
OutStreamer->EmitAssemblerFlag(MCAF_SubsectionsViaSymbols);
OutStreamer->emitAssemblerFlag(MCAF_SubsectionsViaSymbols);
} else if (TT.isOSBinFormatCOFF()) {
if (MMI->usesMSVCFloatingPoint()) {
// In Windows' libcmt.lib, there is a file which is linked in only if the
Expand All @@ -734,7 +734,7 @@ void X86AsmPrinter::emitEndOfAsmFile(Module &M) {
StringRef SymbolName =
(TT.getArch() == Triple::x86) ? "__fltused" : "_fltused";
MCSymbol *S = MMI->getContext().getOrCreateSymbol(SymbolName);
OutStreamer->EmitSymbolAttribute(S, MCSA_Global);
OutStreamer->emitSymbolAttribute(S, MCSA_Global);
return;
}
emitStackMaps(SM);
Expand Down
12 changes: 6 additions & 6 deletions llvm/lib/Target/X86/X86MCInstLower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ MCOperand X86MCInstLower::LowerSymbolOperand(const MachineOperand &MO,
// local labels. This is only safe when the symbols are in the same
// section so we are restricting it to jumptable references.
MCSymbol *Label = Ctx.createTempSymbol();
AsmPrinter.OutStreamer->EmitAssignment(Label, Expr);
AsmPrinter.OutStreamer->emitAssignment(Label, Expr);
Expr = MCSymbolRefExpr::create(Label, Ctx);
}
break;
Expand Down Expand Up @@ -1151,7 +1151,7 @@ static unsigned EmitNop(MCStreamer &OS, unsigned NumBytes, bool Is64Bit,
unsigned NumPrefixes = std::min(NumBytes - NopSize, 5U);
NopSize += NumPrefixes;
for (unsigned i = 0; i != NumPrefixes; ++i)
OS.EmitBytes("\x66");
OS.emitBytes("\x66");

switch (Opc) {
default: llvm_unreachable("Unexpected opcode");
Expand Down Expand Up @@ -1451,7 +1451,7 @@ void X86AsmPrinter::LowerPATCHABLE_EVENT_CALL(const MachineInstr &MI,
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as
// an operand (computed as an offset from the jmp instruction).
// FIXME: Find another less hacky way do force the relative jump.
OutStreamer->EmitBinaryData("\xeb\x0f");
OutStreamer->emitBinaryData("\xeb\x0f");

// The default C calling convention will place two arguments into %rcx and
// %rdx -- so we only work with those.
Expand Down Expand Up @@ -1547,7 +1547,7 @@ void X86AsmPrinter::LowerPATCHABLE_TYPED_EVENT_CALL(const MachineInstr &MI,
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as
// an operand (computed as an offset from the jmp instruction).
// FIXME: Find another less hacky way do force the relative jump.
OutStreamer->EmitBinaryData("\xeb\x14");
OutStreamer->emitBinaryData("\xeb\x14");

// An x86-64 convention may place three arguments into %rcx, %rdx, and R8,
// so we'll work with those. Or we may be called via SystemV, in which case
Expand Down Expand Up @@ -1649,7 +1649,7 @@ void X86AsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(const MachineInstr &MI,
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as
// an operand (computed as an offset from the jmp instruction).
// FIXME: Find another less hacky way do force the relative jump.
OutStreamer->EmitBytes("\xeb\x09");
OutStreamer->emitBytes("\xeb\x09");
EmitNops(*OutStreamer, 9, Subtarget->is64Bit(), getSubtargetInfo());
recordSled(CurSled, MI, SledKind::FUNCTION_ENTER);
}
Expand Down Expand Up @@ -1704,7 +1704,7 @@ void X86AsmPrinter::LowerPATCHABLE_TAIL_CALL(const MachineInstr &MI,
// Use a two-byte `jmp`. This version of JMP takes an 8-bit relative offset as
// an operand (computed as an offset from the jmp instruction).
// FIXME: Find another less hacky way do force the relative jump.
OutStreamer->EmitBytes("\xeb\x09");
OutStreamer->emitBytes("\xeb\x09");
EmitNops(*OutStreamer, 9, Subtarget->is64Bit(), getSubtargetInfo());
OutStreamer->EmitLabel(Target);
recordSled(CurSled, MI, SledKind::TAIL_CALL);
Expand Down
12 changes: 6 additions & 6 deletions llvm/lib/Target/XCore/XCoreAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ void XCoreAsmPrinter::emitArrayBound(MCSymbol *Sym, const GlobalVariable *GV) {

MCSymbol *SymGlob = OutContext.getOrCreateSymbol(
Twine(Sym->getName() + StringRef(".globound")));
OutStreamer->EmitSymbolAttribute(SymGlob, MCSA_Global);
OutStreamer->EmitAssignment(SymGlob,
OutStreamer->emitSymbolAttribute(SymGlob, MCSA_Global);
OutStreamer->emitAssignment(SymGlob,
MCConstantExpr::create(ATy->getNumElements(),
OutContext));
if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
GV->hasCommonLinkage()) {
OutStreamer->EmitSymbolAttribute(SymGlob, MCSA_Weak);
OutStreamer->emitSymbolAttribute(SymGlob, MCSA_Weak);
}
}
}
Expand Down Expand Up @@ -129,11 +129,11 @@ void XCoreAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
case GlobalValue::ExternalLinkage:
case GlobalValue::CommonLinkage:
emitArrayBound(GVSym, GV);
OutStreamer->EmitSymbolAttribute(GVSym, MCSA_Global);
OutStreamer->emitSymbolAttribute(GVSym, MCSA_Global);

if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
GV->hasCommonLinkage())
OutStreamer->EmitSymbolAttribute(GVSym, MCSA_Weak);
OutStreamer->emitSymbolAttribute(GVSym, MCSA_Weak);
LLVM_FALLTHROUGH;
case GlobalValue::InternalLinkage:
case GlobalValue::PrivateLinkage:
Expand All @@ -149,7 +149,7 @@ void XCoreAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
}
unsigned Size = DL.getTypeAllocSize(C->getType());
if (MAI->hasDotTypeDotSizeDirective()) {
OutStreamer->EmitSymbolAttribute(GVSym, MCSA_ELF_TypeObject);
OutStreamer->emitSymbolAttribute(GVSym, MCSA_ELF_TypeObject);
OutStreamer->emitELFSize(GVSym, MCConstantExpr::create(Size, OutContext));
}
OutStreamer->EmitLabel(GVSym);
Expand Down
32 changes: 16 additions & 16 deletions llvm/tools/dsymutil/DwarfStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void DwarfStreamer::emitSectionContents(const object::ObjectFile &Obj,

if (auto Sec = getSectionByName(Obj, SecName)) {
if (Expected<StringRef> E = Sec->getContents())
MS->EmitBytes(*E);
MS->emitBytes(*E);
else
consumeError(E.takeError());
}
Expand All @@ -237,7 +237,7 @@ void DwarfStreamer::emitStrings(const NonRelocatableStringpool &Pool) {
std::vector<DwarfStringPoolEntryRef> Entries = Pool.getEntriesForEmission();
for (auto Entry : Entries) {
// Emit the string itself.
Asm->OutStreamer->EmitBytes(Entry.getString());
Asm->OutStreamer->emitBytes(Entry.getString());
// Emit a null terminator.
Asm->emitInt8(0);
}
Expand Down Expand Up @@ -303,7 +303,7 @@ void DwarfStreamer::emitSwiftAST(StringRef Buffer) {
MCSection *SwiftASTSection = MOFI->getDwarfSwiftASTSection();
SwiftASTSection->setAlignment(Align(32));
MS->SwitchSection(SwiftASTSection);
MS->EmitBytes(Buffer);
MS->emitBytes(Buffer);
}

/// Emit the debug_range section contents for \p FuncRange by
Expand Down Expand Up @@ -485,7 +485,7 @@ void DwarfStreamer::emitLocationsForUnit(
Buffer.resize(0);
StringRef Input = InputSec.Data.substr(Offset, Length);
ProcessExpr(Input, Buffer);
Asm->OutStreamer->EmitBytes(
Asm->OutStreamer->emitBytes(
StringRef((const char *)Buffer.data(), Length));
Offset += Length;
LocSectionSize += Length + 2;
Expand All @@ -508,7 +508,7 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
Asm->emitLabelDifference(LineEndSym, LineStartSym, 4);
Asm->OutStreamer->EmitLabel(LineStartSym);
// Copy Prologue.
MS->EmitBytes(PrologueBytes);
MS->emitBytes(PrologueBytes);
LineSectionSize += PrologueBytes.size() + 4;

SmallString<128> EncodingBuffer;
Expand All @@ -519,7 +519,7 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
// address in that case.
MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(), 0,
EncodingOS);
MS->EmitBytes(EncodingOS.str());
MS->emitBytes(EncodingOS.str());
LineSectionSize += EncodingBuffer.size();
MS->EmitLabel(LineEndSym);
return;
Expand Down Expand Up @@ -600,7 +600,7 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
int64_t LineDelta = int64_t(Row.Line) - LastLine;
if (!Row.EndSequence) {
MCDwarfLineAddr::Encode(*MC, Params, LineDelta, AddressDelta, EncodingOS);
MS->EmitBytes(EncodingOS.str());
MS->emitBytes(EncodingOS.str());
LineSectionSize += EncodingBuffer.size();
EncodingBuffer.resize(0);
Address = Row.Address.Address;
Expand All @@ -619,7 +619,7 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
}
MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(),
0, EncodingOS);
MS->EmitBytes(EncodingOS.str());
MS->emitBytes(EncodingOS.str());
LineSectionSize += EncodingBuffer.size();
EncodingBuffer.resize(0);
Address = -1ULL;
Expand All @@ -631,7 +631,7 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
if (RowsSinceLastSequence) {
MCDwarfLineAddr::Encode(*MC, Params, std::numeric_limits<int64_t>::max(), 0,
EncodingOS);
MS->EmitBytes(EncodingOS.str());
MS->emitBytes(EncodingOS.str());
LineSectionSize += EncodingBuffer.size();
EncodingBuffer.resize(0);
}
Expand Down Expand Up @@ -677,7 +677,7 @@ void DwarfStreamer::translateLineTable(DataExtractor Data, uint64_t Offset) {
Offset += (Version >= 4) ? 5 : 4;
unsigned OpcodeBase = Data.getU8(&Offset);
Offset += OpcodeBase - 1;
Asm->OutStreamer->EmitBytes(Contents.slice(AfterHeaderLengthOffset, Offset));
Asm->OutStreamer->emitBytes(Contents.slice(AfterHeaderLengthOffset, Offset));
LineSectionSize += Offset - AfterHeaderLengthOffset;

// Offset points to the first directory.
Expand All @@ -686,7 +686,7 @@ void DwarfStreamer::translateLineTable(DataExtractor Data, uint64_t Offset) {
break;

StringRef Translated = Options.Translator(Dir);
Asm->OutStreamer->EmitBytes(Translated);
Asm->OutStreamer->emitBytes(Translated);
Asm->emitInt8(0);
LineSectionSize += Translated.size() + 1;
}
Expand All @@ -698,7 +698,7 @@ void DwarfStreamer::translateLineTable(DataExtractor Data, uint64_t Offset) {
break;

StringRef Translated = Options.Translator(File);
Asm->OutStreamer->EmitBytes(Translated);
Asm->OutStreamer->emitBytes(Translated);
Asm->emitInt8(0);
LineSectionSize += Translated.size() + 1;

Expand All @@ -714,7 +714,7 @@ void DwarfStreamer::translateLineTable(DataExtractor Data, uint64_t Offset) {
Asm->OutStreamer->EmitLabel(HeaderEndLabel);

// Copy the actual line table program over.
Asm->OutStreamer->EmitBytes(Contents.slice(Offset, UnitEnd));
Asm->OutStreamer->emitBytes(Contents.slice(Offset, UnitEnd));
LineSectionSize += UnitEnd - Offset;

Asm->OutStreamer->EmitLabel(EndLabel);
Expand Down Expand Up @@ -771,7 +771,7 @@ void DwarfStreamer::emitPubSectionForUnit(
Asm->emitInt32(Name.Die->getOffset());

// Emit the string itself.
Asm->OutStreamer->EmitBytes(Name.Name.getString());
Asm->OutStreamer->emitBytes(Name.Name.getString());
// Emit a null terminator.
Asm->emitInt8(0);
}
Expand Down Expand Up @@ -802,7 +802,7 @@ void DwarfStreamer::emitPubTypesForUnit(const CompileUnit &Unit) {
void DwarfStreamer::emitCIE(StringRef CIEBytes) {
MS->SwitchSection(MC->getObjectFileInfo()->getDwarfFrameSection());

MS->EmitBytes(CIEBytes);
MS->emitBytes(CIEBytes);
FrameSectionSize += CIEBytes.size();
}

Expand All @@ -816,7 +816,7 @@ void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize,
MS->EmitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
MS->EmitIntValue(CIEOffset, 4);
MS->EmitIntValue(Address, AddrSize);
MS->EmitBytes(FDEBytes);
MS->emitBytes(FDEBytes);
FrameSectionSize += FDEBytes.size() + 8 + AddrSize;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-dwp/DWPStringPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DWPStringPool {
auto Pair = Pool.insert(std::make_pair(Str, Offset));
if (Pair.second) {
Out.SwitchSection(Sec);
Out.EmitBytes(StringRef(Str, Length));
Out.emitBytes(StringRef(Str, Length));
Offset += Length;
}

Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/llvm-dwp/llvm-dwp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void addAllTypesFromDWP(
++I;
}
auto &C = Entry.Contributions[DW_SECT_TYPES - DW_SECT_INFO];
Out.EmitBytes(Types.substr(
Out.emitBytes(Types.substr(
C.Offset - TUEntry.Contributions[DW_SECT_TYPES - DW_SECT_INFO].Offset,
C.Length));
C.Offset = TypesOffset;
Expand Down Expand Up @@ -272,7 +272,7 @@ static void addAllTypes(MCStreamer &Out,
if (!P.second)
continue;

Out.EmitBytes(Types.substr(PrevOffset, C.Length));
Out.emitBytes(Types.substr(PrevOffset, C.Length));
TypesOffset += C.Length;
}
}
Expand Down Expand Up @@ -458,7 +458,7 @@ static Error handleSection(
CurTUIndexSection = Contents;
else {
Out.SwitchSection(OutSection);
Out.EmitBytes(Contents);
Out.emitBytes(Contents);
}
return Error::success();
}
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ class BenchmarkCodeStreamer : public MCStreamer, public AsmCommentConsumer {

private:
// We only care about instructions, we don't implement this part of the API.
void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) override {}
bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
return false;
}
void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value,
unsigned ValueSize,
unsigned MaxBytesToEmit) override {}
void EmitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
void emitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment, SMLoc Loc) override {}

unsigned findRegisterByName(const StringRef RegName) const {
Expand Down
6 changes: 3 additions & 3 deletions llvm/tools/llvm-mca/CodeRegionGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ class MCStreamerWrapper final : public MCStreamer {
Regions.addInstruction(Inst);
}

bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override {
return true;
}

void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
unsigned ByteAlignment) override {}
void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
uint64_t Size = 0, unsigned ByteAlignment = 0,
SMLoc Loc = SMLoc()) override {}
void EmitGPRel32Value(const MCExpr *Value) override {}
Expand Down
4 changes: 2 additions & 2 deletions llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2520,10 +2520,10 @@ TEST(DWARFDebugInfo, TestErrorReportingPolicy) {
// Emit two compressed sections with broken headers.
AP->OutStreamer->SwitchSection(
MC->getELFSection(".zdebug_foo", 0 /*Type*/, 0 /*Flags*/));
AP->OutStreamer->EmitBytes("0");
AP->OutStreamer->emitBytes("0");
AP->OutStreamer->SwitchSection(
MC->getELFSection(".zdebug_bar", 0 /*Type*/, 0 /*Flags*/));
AP->OutStreamer->EmitBytes("0");
AP->OutStreamer->emitBytes("0");

MemoryBufferRef FileBuffer(DG->generate(), "dwarf");
auto Obj = object::ObjectFile::createObjectFile(FileBuffer);
Expand Down
2 changes: 1 addition & 1 deletion llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void dwarfgen::LineTable::writePrologue(AsmPrinter &Asm) const {
}

static void writeCString(StringRef Str, AsmPrinter &Asm) {
Asm.OutStreamer->EmitBytes(Str);
Asm.OutStreamer->emitBytes(Str);
Asm.emitInt8(0);
}

Expand Down