34 changes: 17 additions & 17 deletions llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ void MipsRegInfoRecord::EmitMipsOptionRecord() {
Sec->setAlignment(Align(8));
Streamer->SwitchSection(Sec);

Streamer->EmitIntValue(ELF::ODK_REGINFO, 1); // kind
Streamer->EmitIntValue(40, 1); // size
Streamer->EmitIntValue(0, 2); // section
Streamer->EmitIntValue(0, 4); // info
Streamer->EmitIntValue(ri_gprmask, 4);
Streamer->EmitIntValue(0, 4); // pad
Streamer->EmitIntValue(ri_cprmask[0], 4);
Streamer->EmitIntValue(ri_cprmask[1], 4);
Streamer->EmitIntValue(ri_cprmask[2], 4);
Streamer->EmitIntValue(ri_cprmask[3], 4);
Streamer->EmitIntValue(ri_gp_value, 8);
Streamer->emitIntValue(ELF::ODK_REGINFO, 1); // kind
Streamer->emitIntValue(40, 1); // size
Streamer->emitIntValue(0, 2); // section
Streamer->emitIntValue(0, 4); // info
Streamer->emitIntValue(ri_gprmask, 4);
Streamer->emitIntValue(0, 4); // pad
Streamer->emitIntValue(ri_cprmask[0], 4);
Streamer->emitIntValue(ri_cprmask[1], 4);
Streamer->emitIntValue(ri_cprmask[2], 4);
Streamer->emitIntValue(ri_cprmask[3], 4);
Streamer->emitIntValue(ri_gp_value, 8);
} else {
MCSectionELF *Sec = Context.getELFSection(".reginfo", ELF::SHT_MIPS_REGINFO,
ELF::SHF_ALLOC, 24, "");
MCA.registerSection(*Sec);
Sec->setAlignment(MTS->getABI().IsN32() ? Align(8) : Align(4));
Streamer->SwitchSection(Sec);

Streamer->EmitIntValue(ri_gprmask, 4);
Streamer->EmitIntValue(ri_cprmask[0], 4);
Streamer->EmitIntValue(ri_cprmask[1], 4);
Streamer->EmitIntValue(ri_cprmask[2], 4);
Streamer->EmitIntValue(ri_cprmask[3], 4);
Streamer->emitIntValue(ri_gprmask, 4);
Streamer->emitIntValue(ri_cprmask[0], 4);
Streamer->emitIntValue(ri_cprmask[1], 4);
Streamer->emitIntValue(ri_cprmask[2], 4);
Streamer->emitIntValue(ri_cprmask[3], 4);
assert((ri_gp_value & 0xffffffff) == ri_gp_value);
Streamer->EmitIntValue(ri_gp_value, 4);
Streamer->emitIntValue(ri_gp_value, 4);
}

Streamer->PopSection();
Expand Down
14 changes: 7 additions & 7 deletions llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,15 +999,15 @@ void MipsTargetELFStreamer::emitDirectiveEnd(StringRef Name) {

OS.emitValueImpl(ExprRef, 4);

OS.EmitIntValue(GPRInfoSet ? GPRBitMask : 0, 4); // reg_mask
OS.EmitIntValue(GPRInfoSet ? GPROffset : 0, 4); // reg_offset
OS.emitIntValue(GPRInfoSet ? GPRBitMask : 0, 4); // reg_mask
OS.emitIntValue(GPRInfoSet ? GPROffset : 0, 4); // reg_offset

OS.EmitIntValue(FPRInfoSet ? FPRBitMask : 0, 4); // fpreg_mask
OS.EmitIntValue(FPRInfoSet ? FPROffset : 0, 4); // fpreg_offset
OS.emitIntValue(FPRInfoSet ? FPRBitMask : 0, 4); // fpreg_mask
OS.emitIntValue(FPRInfoSet ? FPROffset : 0, 4); // fpreg_offset

OS.EmitIntValue(FrameInfoSet ? FrameOffset : 0, 4); // frame_offset
OS.EmitIntValue(FrameInfoSet ? FrameReg : 0, 4); // frame_reg
OS.EmitIntValue(FrameInfoSet ? ReturnReg : 0, 4); // return_reg
OS.emitIntValue(FrameInfoSet ? FrameOffset : 0, 4); // frame_offset
OS.emitIntValue(FrameInfoSet ? FrameReg : 0, 4); // frame_reg
OS.emitIntValue(FrameInfoSet ? ReturnReg : 0, 4); // return_reg

// The .end directive marks the end of a procedure. Invalidate
// the information gathered up until this point.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,9 +1679,9 @@ bool PPCAsmParser::ParseDirectiveWord(unsigned Size, AsmToken ID) {
if (!isUIntN(8 * Size, IntValue) && !isIntN(8 * Size, IntValue))
return Error(ExprLoc, "literal value out of range for '" +
ID.getIdentifier() + "' directive");
getStreamer().EmitIntValue(IntValue, Size);
getStreamer().emitIntValue(IntValue, Size);
} else
getStreamer().EmitValue(Value, Size, ExprLoc);
getStreamer().emitValue(Value, Size, ExprLoc);
return false;
};

Expand Down
22 changes: 11 additions & 11 deletions llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
MCSymbolRefExpr::create(GOTRef, OutContext),
OutContext);
OutStreamer->emitLabel(GOTRef);
OutStreamer->EmitValue(OffsExpr, 4);
OutStreamer->emitValue(OffsExpr, 4);
OutStreamer->emitLabel(NextInstr);
EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::MFLR)
.addReg(MI->getOperand(0).getReg()));
Expand Down Expand Up @@ -1343,7 +1343,7 @@ void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
OutContext),
MCSymbolRefExpr::create(PICBase, OutContext),
OutContext);
OutStreamer->EmitValue(OffsExpr, 4);
OutStreamer->emitValue(OffsExpr, 4);
OutStreamer->emitLabel(CurrentFnSym);
return;
} else
Expand All @@ -1369,7 +1369,7 @@ void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
OutContext);

OutStreamer->emitLabel(PPCFI->getTOCOffsetSymbol());
OutStreamer->EmitValue(TOCDeltaExpr, 8);
OutStreamer->emitValue(TOCDeltaExpr, 8);
}
return AsmPrinter::emitFunctionEntryLabel();
}
Expand All @@ -1384,15 +1384,15 @@ void PPCLinuxAsmPrinter::emitFunctionEntryLabel() {
MCSymbol *Symbol1 = CurrentFnSymForSize;
// Generates a R_PPC64_ADDR64 (from FK_DATA_8) relocation for the function
// entry point.
OutStreamer->EmitValue(MCSymbolRefExpr::create(Symbol1, OutContext),
OutStreamer->emitValue(MCSymbolRefExpr::create(Symbol1, OutContext),
8 /*size*/);
MCSymbol *Symbol2 = OutContext.getOrCreateSymbol(StringRef(".TOC."));
// Generates a R_PPC64_TOC relocation for TOC base insertion.
OutStreamer->EmitValue(
OutStreamer->emitValue(
MCSymbolRefExpr::create(Symbol2, MCSymbolRefExpr::VK_PPC_TOCBASE, OutContext),
8/*size*/);
// Emit a null environment pointer.
OutStreamer->EmitIntValue(0, 8 /* size */);
OutStreamer->emitIntValue(0, 8 /* size */);
OutStreamer->SwitchSection(Current.first, Current.second);
}

Expand Down Expand Up @@ -1539,8 +1539,8 @@ void PPCLinuxAsmPrinter::emitFunctionBodyEnd() {
// the PPC64 ELF ABI (this is a low-priority item because GDB does not
// currently make use of these fields).
if (Subtarget->isPPC64()) {
OutStreamer->EmitIntValue(0, 4/*size*/);
OutStreamer->EmitIntValue(0, 8/*size*/);
OutStreamer->emitIntValue(0, 4/*size*/);
OutStreamer->emitIntValue(0, 8/*size*/);
}
}

Expand Down Expand Up @@ -1647,16 +1647,16 @@ void PPCAIXAsmPrinter::emitFunctionDescriptor() {
cast<MCSymbolXCOFF>(CurrentFnDescSym)->getContainingCsect());
OutStreamer->emitLabel(CurrentFnDescSym);
// Emit function entry point address.
OutStreamer->EmitValue(MCSymbolRefExpr::create(CurrentFnSym, OutContext),
OutStreamer->emitValue(MCSymbolRefExpr::create(CurrentFnSym, OutContext),
PointerSize);
// Emit TOC base address.
const MCSymbol *TOCBaseSym =
cast<MCSectionXCOFF>(getObjFileLowering().getTOCBaseSection())
->getQualNameSymbol();
OutStreamer->EmitValue(MCSymbolRefExpr::create(TOCBaseSym, OutContext),
OutStreamer->emitValue(MCSymbolRefExpr::create(TOCBaseSym, OutContext),
PointerSize);
// Emit a null environment pointer.
OutStreamer->EmitIntValue(0, PointerSize);
OutStreamer->emitIntValue(0, PointerSize);

OutStreamer->SwitchSection(Current.first, Current.second);
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ void SystemZAsmPrinter::emitMachineConstantPoolValue(
OutContext);
uint64_t Size = getDataLayout().getTypeAllocSize(ZCPV->getType());

OutStreamer->EmitValue(Expr, Size);
OutStreamer->emitValue(Expr, Size);
}

bool SystemZAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ class WebAssemblyAsmParser final : public MCTargetAsmParser {
return error("Cannot parse .int expression: ", Lexer.getTok());
size_t NumBits = 0;
DirectiveID.getString().drop_front(4).getAsInteger(10, NumBits);
Out.EmitValue(Val, NumBits / 8, End);
Out.emitValue(Val, NumBits / 8, End);
return expect(AsmToken::EndOfStatement, "EOL");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ WebAssemblyTargetStreamer::WebAssemblyTargetStreamer(MCStreamer &S)
: MCTargetStreamer(S) {}

void WebAssemblyTargetStreamer::emitValueType(wasm::ValType Type) {
Streamer.EmitIntValue(uint8_t(Type), 1);
Streamer.emitIntValue(uint8_t(Type), 1);
}

WebAssemblyTargetAsmStreamer::WebAssemblyTargetAsmStreamer(
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void WebAssemblyAsmPrinter::EmitTargetFeatures(Module &M) {

OutStreamer->emitULEB128IntValue(EmittedFeatures.size());
for (auto &F : EmittedFeatures) {
OutStreamer->EmitIntValue(F.Prefix, 1);
OutStreamer->emitIntValue(F.Prefix, 1);
OutStreamer->emitULEB128IntValue(F.Name.size());
OutStreamer->emitBytes(F.Name);
}
Expand Down
16 changes: 8 additions & 8 deletions llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,13 +372,13 @@ void FPOStateMachine::emitFrameDataRecord(MCStreamer &OS, MCSymbol *Label) {

OS.emitAbsoluteSymbolDiff(Label, FPO->Begin, 4); // RvaStart
OS.emitAbsoluteSymbolDiff(FPO->End, Label, 4); // CodeSize
OS.EmitIntValue(LocalSize, 4);
OS.EmitIntValue(FPO->ParamsSize, 4);
OS.EmitIntValue(MaxStackSize, 4);
OS.EmitIntValue(FrameFuncStrTabOff, 4); // FrameFunc
OS.emitIntValue(LocalSize, 4);
OS.emitIntValue(FPO->ParamsSize, 4);
OS.emitIntValue(MaxStackSize, 4);
OS.emitIntValue(FrameFuncStrTabOff, 4); // FrameFunc
OS.emitAbsoluteSymbolDiff(FPO->PrologueEnd, Label, 2);
OS.EmitIntValue(SavedRegSize, 2);
OS.EmitIntValue(CurFlags, 4);
OS.emitIntValue(SavedRegSize, 2);
OS.emitIntValue(CurFlags, 4);
}

/// Compute and emit the real CodeView FrameData subsection.
Expand All @@ -398,12 +398,12 @@ bool X86WinCOFFTargetStreamer::emitFPOData(const MCSymbol *ProcSym, SMLoc L) {
MCSymbol *FrameBegin = Ctx.createTempSymbol(),
*FrameEnd = Ctx.createTempSymbol();

OS.EmitIntValue(unsigned(DebugSubsectionKind::FrameData), 4);
OS.emitIntValue(unsigned(DebugSubsectionKind::FrameData), 4);
OS.emitAbsoluteSymbolDiff(FrameEnd, FrameBegin, 4);
OS.emitLabel(FrameBegin);

// Start with the RVA of the function in question.
OS.EmitValue(MCSymbolRefExpr::create(FPO->Function,
OS.emitValue(MCSymbolRefExpr::create(FPO->Function,
MCSymbolRefExpr::VK_COFF_IMGREL32, Ctx),
4);

Expand Down
16 changes: 8 additions & 8 deletions llvm/lib/Target/X86/X86AsmPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,15 +598,15 @@ void X86AsmPrinter::emitStartOfAsmFile(Module &M) {
// Emitting note header.
int WordSize = TT.isArch64Bit() ? 8 : 4;
emitAlignment(WordSize == 4 ? Align(4) : Align(8));
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->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

// Emitting an Elf_Prop for the CET properties.
OutStreamer->EmitIntValue(ELF::GNU_PROPERTY_X86_FEATURE_1_AND, 4);
OutStreamer->EmitIntValue(4, 4); // data size
OutStreamer->EmitIntValue(FeatureFlagsAnd, 4); // data
OutStreamer->emitIntValue(ELF::GNU_PROPERTY_X86_FEATURE_1_AND, 4);
OutStreamer->emitIntValue(4, 4); // data size
OutStreamer->emitIntValue(FeatureFlagsAnd, 4); // data
emitAlignment(WordSize == 4 ? Align(4) : Align(8)); // padding

OutStreamer->endSection(Nt);
Expand Down Expand Up @@ -662,15 +662,15 @@ emitNonLazySymbolPointer(MCStreamer &OutStreamer, MCSymbol *StubLabel,

if (MCSym.getInt())
// External to current translation unit.
OutStreamer.EmitIntValue(0, 4/*size*/);
OutStreamer.emitIntValue(0, 4/*size*/);
else
// Internal to current translation unit.
//
// When we place the LSDA into the TEXT section, the type info
// pointers need to be indirect and pc-rel. We accomplish this by
// using NLPs; however, sometimes the types are local to the file.
// We need to fill in the value for the NLP in those cases.
OutStreamer.EmitValue(
OutStreamer.emitValue(
MCSymbolRefExpr::create(MCSym.getPointer(), OutStreamer.getContext()),
4 /*size*/);
}
Expand Down
68 changes: 34 additions & 34 deletions llvm/tools/dsymutil/DwarfStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,14 @@ void DwarfStreamer::emitRangesEntries(
if (!(Range.StartAddress + OrigLowPc >= FuncRange.start() &&
Range.EndAddress + OrigLowPc <= FuncRange.stop()))
warn("inconsistent range data.", "emitting debug_ranges");
MS->EmitIntValue(Range.StartAddress + PcOffset, AddressSize);
MS->EmitIntValue(Range.EndAddress + PcOffset, AddressSize);
MS->emitIntValue(Range.StartAddress + PcOffset, AddressSize);
MS->emitIntValue(Range.EndAddress + PcOffset, AddressSize);
RangesSectionSize += 2 * AddressSize;
}

// Add the terminator entry.
MS->EmitIntValue(0, AddressSize);
MS->EmitIntValue(0, AddressSize);
MS->emitIntValue(0, AddressSize);
MS->emitIntValue(0, AddressSize);
RangesSectionSize += 2 * AddressSize;
}

Expand Down Expand Up @@ -394,15 +394,15 @@ void DwarfStreamer::emitUnitRangesEntries(CompileUnit &Unit,
for (auto Range = Ranges.begin(), End = Ranges.end(); Range != End;
++Range) {
uint64_t RangeStart = Range->first;
MS->EmitIntValue(RangeStart, AddressSize);
MS->emitIntValue(RangeStart, AddressSize);
while ((Range + 1) != End && Range->second == (Range + 1)->first)
++Range;
MS->EmitIntValue(Range->second - RangeStart, AddressSize);
MS->emitIntValue(Range->second - RangeStart, AddressSize);
}

// Emit terminator
Asm->OutStreamer->EmitIntValue(0, AddressSize);
Asm->OutStreamer->EmitIntValue(0, AddressSize);
Asm->OutStreamer->emitIntValue(0, AddressSize);
Asm->OutStreamer->emitIntValue(0, AddressSize);
Asm->OutStreamer->emitLabel(EndLabel);
}

Expand All @@ -414,16 +414,16 @@ void DwarfStreamer::emitUnitRangesEntries(CompileUnit &Unit,
int64_t PcOffset = -Unit.getLowPc();
// Emit coalesced ranges.
for (auto Range = Ranges.begin(), End = Ranges.end(); Range != End; ++Range) {
MS->EmitIntValue(Range->first + PcOffset, AddressSize);
MS->emitIntValue(Range->first + PcOffset, AddressSize);
while (Range + 1 != End && Range->second == (Range + 1)->first)
++Range;
MS->EmitIntValue(Range->second + PcOffset, AddressSize);
MS->emitIntValue(Range->second + PcOffset, AddressSize);
RangesSectionSize += 2 * AddressSize;
}

// Add the terminator entry.
MS->EmitIntValue(0, AddressSize);
MS->EmitIntValue(0, AddressSize);
MS->emitIntValue(0, AddressSize);
MS->emitIntValue(0, AddressSize);
RangesSectionSize += 2 * AddressSize;
}

Expand Down Expand Up @@ -464,22 +464,22 @@ void DwarfStreamer::emitLocationsForUnit(
LocSectionSize += 2 * AddressSize;
// End of list entry.
if (Low == 0 && High == 0) {
Asm->OutStreamer->EmitIntValue(0, AddressSize);
Asm->OutStreamer->EmitIntValue(0, AddressSize);
Asm->OutStreamer->emitIntValue(0, AddressSize);
Asm->OutStreamer->emitIntValue(0, AddressSize);
break;
}
// Base address selection entry.
if (Low == BaseAddressMarker) {
Asm->OutStreamer->EmitIntValue(BaseAddressMarker, AddressSize);
Asm->OutStreamer->EmitIntValue(High + Attr.second, AddressSize);
Asm->OutStreamer->emitIntValue(BaseAddressMarker, AddressSize);
Asm->OutStreamer->emitIntValue(High + Attr.second, AddressSize);
LocPcOffset = 0;
continue;
}
// Location list entry.
Asm->OutStreamer->EmitIntValue(Low + LocPcOffset, AddressSize);
Asm->OutStreamer->EmitIntValue(High + LocPcOffset, AddressSize);
Asm->OutStreamer->emitIntValue(Low + LocPcOffset, AddressSize);
Asm->OutStreamer->emitIntValue(High + LocPcOffset, AddressSize);
uint64_t Length = Data.getU16(&Offset);
Asm->OutStreamer->EmitIntValue(Length, 2);
Asm->OutStreamer->emitIntValue(Length, 2);
// Copy the bytes into to the buffer, process them, emit them.
Buffer.reserve(Length);
Buffer.resize(0);
Expand Down Expand Up @@ -540,10 +540,10 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,

int64_t AddressDelta;
if (Address == -1ULL) {
MS->EmitIntValue(dwarf::DW_LNS_extended_op, 1);
MS->emitIntValue(dwarf::DW_LNS_extended_op, 1);
MS->emitULEB128IntValue(PointerSize + 1);
MS->EmitIntValue(dwarf::DW_LNE_set_address, 1);
MS->EmitIntValue(Row.Address.Address, PointerSize);
MS->emitIntValue(dwarf::DW_LNE_set_address, 1);
MS->emitIntValue(Row.Address.Address, PointerSize);
LineSectionSize += 2 + PointerSize + getULEB128Size(PointerSize + 1);
AddressDelta = 0;
} else {
Expand All @@ -557,13 +557,13 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,

if (FileNum != Row.File) {
FileNum = Row.File;
MS->EmitIntValue(dwarf::DW_LNS_set_file, 1);
MS->emitIntValue(dwarf::DW_LNS_set_file, 1);
MS->emitULEB128IntValue(FileNum);
LineSectionSize += 1 + getULEB128Size(FileNum);
}
if (Column != Row.Column) {
Column = Row.Column;
MS->EmitIntValue(dwarf::DW_LNS_set_column, 1);
MS->emitIntValue(dwarf::DW_LNS_set_column, 1);
MS->emitULEB128IntValue(Column);
LineSectionSize += 1 + getULEB128Size(Column);
}
Expand All @@ -573,27 +573,27 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,

if (Isa != Row.Isa) {
Isa = Row.Isa;
MS->EmitIntValue(dwarf::DW_LNS_set_isa, 1);
MS->emitIntValue(dwarf::DW_LNS_set_isa, 1);
MS->emitULEB128IntValue(Isa);
LineSectionSize += 1 + getULEB128Size(Isa);
}
if (IsStatement != Row.IsStmt) {
IsStatement = Row.IsStmt;
MS->EmitIntValue(dwarf::DW_LNS_negate_stmt, 1);
MS->emitIntValue(dwarf::DW_LNS_negate_stmt, 1);
LineSectionSize += 1;
}
if (Row.BasicBlock) {
MS->EmitIntValue(dwarf::DW_LNS_set_basic_block, 1);
MS->emitIntValue(dwarf::DW_LNS_set_basic_block, 1);
LineSectionSize += 1;
}

if (Row.PrologueEnd) {
MS->EmitIntValue(dwarf::DW_LNS_set_prologue_end, 1);
MS->emitIntValue(dwarf::DW_LNS_set_prologue_end, 1);
LineSectionSize += 1;
}

if (Row.EpilogueBegin) {
MS->EmitIntValue(dwarf::DW_LNS_set_epilogue_begin, 1);
MS->emitIntValue(dwarf::DW_LNS_set_epilogue_begin, 1);
LineSectionSize += 1;
}

Expand All @@ -608,12 +608,12 @@ void DwarfStreamer::emitLineTableForUnit(MCDwarfLineTableParams Params,
RowsSinceLastSequence++;
} else {
if (LineDelta) {
MS->EmitIntValue(dwarf::DW_LNS_advance_line, 1);
MS->emitIntValue(dwarf::DW_LNS_advance_line, 1);
MS->emitSLEB128IntValue(LineDelta);
LineSectionSize += 1 + getSLEB128Size(LineDelta);
}
if (AddressDelta) {
MS->EmitIntValue(dwarf::DW_LNS_advance_pc, 1);
MS->emitIntValue(dwarf::DW_LNS_advance_pc, 1);
MS->emitULEB128IntValue(AddressDelta);
LineSectionSize += 1 + getULEB128Size(AddressDelta);
}
Expand Down Expand Up @@ -813,9 +813,9 @@ void DwarfStreamer::emitFDE(uint32_t CIEOffset, uint32_t AddrSize,
uint32_t Address, StringRef FDEBytes) {
MS->SwitchSection(MC->getObjectFileInfo()->getDwarfFrameSection());

MS->EmitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
MS->EmitIntValue(CIEOffset, 4);
MS->EmitIntValue(Address, AddrSize);
MS->emitIntValue(FDEBytes.size() + 4 + AddrSize, 4);
MS->emitIntValue(CIEOffset, 4);
MS->emitIntValue(Address, AddrSize);
MS->emitBytes(FDEBytes);
FrameSectionSize += FDEBytes.size() + 8 + AddrSize;
}
Expand Down
18 changes: 9 additions & 9 deletions llvm/tools/llvm-dwp/llvm-dwp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings,
while (Offset < Size) {
auto OldOffset = Data.getU32(&Offset);
auto NewOffset = OffsetRemapping[OldOffset];
Out.EmitIntValue(NewOffset, 4);
Out.emitIntValue(NewOffset, 4);
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ writeIndexTable(MCStreamer &Out, ArrayRef<unsigned> ContributionOffsets,
for (const auto &E : IndexEntries)
for (size_t i = 0; i != array_lengthof(E.second.Contributions); ++i)
if (ContributionOffsets[i])
Out.EmitIntValue(E.second.Contributions[i].*Field, 4);
Out.emitIntValue(E.second.Contributions[i].*Field, 4);
}

static void
Expand Down Expand Up @@ -317,23 +317,23 @@ writeIndex(MCStreamer &Out, MCSection *Section,
}

Out.SwitchSection(Section);
Out.EmitIntValue(2, 4); // Version
Out.EmitIntValue(Columns, 4); // Columns
Out.EmitIntValue(IndexEntries.size(), 4); // Num Units
Out.EmitIntValue(Buckets.size(), 4); // Num Buckets
Out.emitIntValue(2, 4); // Version
Out.emitIntValue(Columns, 4); // Columns
Out.emitIntValue(IndexEntries.size(), 4); // Num Units
Out.emitIntValue(Buckets.size(), 4); // Num Buckets

// Write the signatures.
for (const auto &I : Buckets)
Out.EmitIntValue(I ? IndexEntries.begin()[I - 1].first : 0, 8);
Out.emitIntValue(I ? IndexEntries.begin()[I - 1].first : 0, 8);

// Write the indexes.
for (const auto &I : Buckets)
Out.EmitIntValue(I, 4);
Out.emitIntValue(I, 4);

// Write the column headers (which sections will appear in the table)
for (size_t i = 0; i != ContributionOffsets.size(); ++i)
if (ContributionOffsets[i])
Out.EmitIntValue(i + DW_SECT_INFO, 4);
Out.emitIntValue(i + DW_SECT_INFO, 4);

// Write the offsets.
writeIndexTable(Out, ContributionOffsets, IndexEntries,
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 @@ -247,7 +247,7 @@ void dwarfgen::LineTable::writeData(ArrayRef<ValueAndLength> Data,
case Half:
case Long:
case Quad:
Asm.OutStreamer->EmitIntValue(Entry.Value, Entry.Length);
Asm.OutStreamer->emitIntValue(Entry.Value, Entry.Length);
continue;
case ULEB:
Asm.emitULEB128(Entry.Value);
Expand Down