[llvm] r328848 - Style update. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 29 16:32:54 PDT 2018
Author: rafael
Date: Thu Mar 29 16:32:54 2018
New Revision: 328848
URL: http://llvm.org/viewvc/llvm-project?rev=328848&view=rev
Log:
Style update. NFC.
Rename 3 functions to start with lowercase letters. Don't repeat the
name in the comments.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/ByteStreamer.h
llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Thu Mar 29 16:32:54 2018
@@ -444,13 +444,13 @@ public:
void printOffset(int64_t Offset, raw_ostream &OS) const;
/// Emit a byte directive and value.
- void EmitInt8(int Value) const;
+ void emitInt8(int Value) const;
/// Emit a short directive and value.
- void EmitInt16(int Value) const;
+ void emitInt16(int Value) const;
/// Emit a long directive and value.
- void EmitInt32(int Value) const;
+ void emitInt32(int Value) const;
/// Emit something like ".long Hi-Lo" where the size in bytes of the directive
/// is specified by Size and Hi/Lo specify the labels. This implicitly uses
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp Thu Mar 29 16:32:54 2018
@@ -187,7 +187,7 @@ void AccelTableEmitter::emitHashes() con
if (SkipIdenticalHashes && PrevHash == HashValue)
continue;
Asm->OutStreamer->AddComment("Hash in Bucket " + Twine(BucketIdx));
- Asm->EmitInt32(HashValue);
+ Asm->emitInt32(HashValue);
PrevHash = HashValue;
}
BucketIdx++;
@@ -211,30 +211,30 @@ void AccelTableEmitter::emitOffsets(cons
void AppleAccelTableEmitter::Header::emit(AsmPrinter *Asm) const {
Asm->OutStreamer->AddComment("Header Magic");
- Asm->EmitInt32(Magic);
+ Asm->emitInt32(Magic);
Asm->OutStreamer->AddComment("Header Version");
- Asm->EmitInt16(Version);
+ Asm->emitInt16(Version);
Asm->OutStreamer->AddComment("Header Hash Function");
- Asm->EmitInt16(HashFunction);
+ Asm->emitInt16(HashFunction);
Asm->OutStreamer->AddComment("Header Bucket Count");
- Asm->EmitInt32(BucketCount);
+ Asm->emitInt32(BucketCount);
Asm->OutStreamer->AddComment("Header Hash Count");
- Asm->EmitInt32(HashCount);
+ Asm->emitInt32(HashCount);
Asm->OutStreamer->AddComment("Header Data Length");
- Asm->EmitInt32(HeaderDataLength);
+ Asm->emitInt32(HeaderDataLength);
}
void AppleAccelTableEmitter::HeaderData::emit(AsmPrinter *Asm) const {
Asm->OutStreamer->AddComment("HeaderData Die Offset Base");
- Asm->EmitInt32(DieOffsetBase);
+ Asm->emitInt32(DieOffsetBase);
Asm->OutStreamer->AddComment("HeaderData Atom Count");
- Asm->EmitInt32(Atoms.size());
+ Asm->emitInt32(Atoms.size());
for (const Atom &A : Atoms) {
Asm->OutStreamer->AddComment(dwarf::AtomTypeString(A.Type));
- Asm->EmitInt16(A.Type);
+ Asm->emitInt16(A.Type);
Asm->OutStreamer->AddComment(dwarf::FormEncodingString(A.Form));
- Asm->EmitInt16(A.Form);
+ Asm->emitInt16(A.Form);
}
}
@@ -244,9 +244,9 @@ void AppleAccelTableEmitter::emitBuckets
for (size_t i = 0, e = Buckets.size(); i < e; ++i) {
Asm->OutStreamer->AddComment("Bucket " + Twine(i));
if (!Buckets[i].empty())
- Asm->EmitInt32(index);
+ Asm->emitInt32(index);
else
- Asm->EmitInt32(std::numeric_limits<uint32_t>::max());
+ Asm->emitInt32(std::numeric_limits<uint32_t>::max());
// Buckets point in the list of hashes, not to the data. Do not increment
// the index multiple times in case of hash collisions.
uint64_t PrevHash = std::numeric_limits<uint64_t>::max();
@@ -268,20 +268,20 @@ void AppleAccelTableEmitter::emitData()
// current one.
if (PrevHash != std::numeric_limits<uint64_t>::max() &&
PrevHash != Hash->HashValue)
- Asm->EmitInt32(0);
+ Asm->emitInt32(0);
// Remember to emit the label for our offset.
Asm->OutStreamer->EmitLabel(Hash->Sym);
Asm->OutStreamer->AddComment(Hash->Name.getString());
Asm->emitDwarfStringOffset(Hash->Name);
Asm->OutStreamer->AddComment("Num DIEs");
- Asm->EmitInt32(Hash->Values.size());
+ Asm->emitInt32(Hash->Values.size());
for (const auto *V : Hash->Values)
static_cast<const AppleAccelTableData *>(V)->emit(Asm);
PrevHash = Hash->HashValue;
}
// Emit the final end marker for the bucket.
if (!Buckets[i].empty())
- Asm->EmitInt32(0);
+ Asm->emitInt32(0);
}
}
@@ -302,25 +302,25 @@ void llvm::emitAppleAccelTableImpl(AsmPr
}
void AppleAccelTableOffsetData::emit(AsmPrinter *Asm) const {
- Asm->EmitInt32(Die->getDebugSectionOffset());
+ Asm->emitInt32(Die->getDebugSectionOffset());
}
void AppleAccelTableTypeData::emit(AsmPrinter *Asm) const {
- Asm->EmitInt32(Die->getDebugSectionOffset());
- Asm->EmitInt16(Die->getTag());
- Asm->EmitInt8(0);
+ Asm->emitInt32(Die->getDebugSectionOffset());
+ Asm->emitInt16(Die->getTag());
+ Asm->emitInt8(0);
}
void AppleAccelTableStaticOffsetData::emit(AsmPrinter *Asm) const {
- Asm->EmitInt32(Offset);
+ Asm->emitInt32(Offset);
}
void AppleAccelTableStaticTypeData::emit(AsmPrinter *Asm) const {
- Asm->EmitInt32(Offset);
- Asm->EmitInt16(Tag);
- Asm->EmitInt8(ObjCClassIsImplementation ? dwarf::DW_FLAG_type_implementation
+ Asm->emitInt32(Offset);
+ Asm->emitInt16(Tag);
+ Asm->emitInt8(ObjCClassIsImplementation ? dwarf::DW_FLAG_type_implementation
: 0);
- Asm->EmitInt32(QualifiedNameHash);
+ Asm->emitInt32(QualifiedNameHash);
}
#ifndef _MSC_VER
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Thu Mar 29 16:32:54 2018
@@ -1902,19 +1902,19 @@ void AsmPrinter::EmitModuleIdents(Module
// Emission and print routines
//
-/// EmitInt8 - Emit a byte directive and value.
+/// Emit a byte directive and value.
///
-void AsmPrinter::EmitInt8(int Value) const {
+void AsmPrinter::emitInt8(int Value) const {
OutStreamer->EmitIntValue(Value, 1);
}
-/// EmitInt16 - Emit a short directive and value.
-void AsmPrinter::EmitInt16(int Value) const {
+/// Emit a short directive and value.
+void AsmPrinter::emitInt16(int Value) const {
OutStreamer->EmitIntValue(Value, 2);
}
-/// EmitInt32 - Emit a long directive and value.
-void AsmPrinter::EmitInt32(int Value) const {
+/// Emit a long directive and value.
+void AsmPrinter::emitInt32(int Value) const {
OutStreamer->EmitIntValue(Value, 4);
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Thu Mar 29 16:32:54 2018
@@ -176,7 +176,7 @@ void AsmPrinter::emitDwarfStringOffset(D
}
// Just emit the offset directly; no need for symbol math.
- EmitInt32(S.Offset);
+ emitInt32(S.Offset);
}
void AsmPrinter::EmitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const {
@@ -258,7 +258,7 @@ void AsmPrinter::emitDwarfDIE(const DIE
emitDwarfDIE(Child);
OutStreamer->AddComment("End Of Children Mark");
- EmitInt8(0);
+ emitInt8(0);
}
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/ByteStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/ByteStreamer.h?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/ByteStreamer.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/ByteStreamer.h Thu Mar 29 16:32:54 2018
@@ -43,7 +43,7 @@ public:
APByteStreamer(AsmPrinter &Asm) : AP(Asm) {}
void EmitInt8(uint8_t Byte, const Twine &Comment) override {
AP.OutStreamer->AddComment(Comment);
- AP.EmitInt8(Byte);
+ AP.emitInt8(Byte);
}
void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
AP.OutStreamer->AddComment(Comment);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DIE.cpp Thu Mar 29 16:32:54 2018
@@ -584,8 +584,8 @@ void DIEString::print(raw_ostream &O) co
void DIEInlineString::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
if (Form == dwarf::DW_FORM_string) {
for (char ch : S)
- AP->EmitInt8(ch);
- AP->EmitInt8(0);
+ AP->emitInt8(ch);
+ AP->emitInt8(0);
return;
}
llvm_unreachable("Expected valid string form");
@@ -691,9 +691,9 @@ unsigned DIELoc::ComputeSize(const AsmPr
void DIELoc::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
switch (Form) {
default: llvm_unreachable("Improper form for block");
- case dwarf::DW_FORM_block1: Asm->EmitInt8(Size); break;
- case dwarf::DW_FORM_block2: Asm->EmitInt16(Size); break;
- case dwarf::DW_FORM_block4: Asm->EmitInt32(Size); break;
+ case dwarf::DW_FORM_block1: Asm->emitInt8(Size); break;
+ case dwarf::DW_FORM_block2: Asm->emitInt16(Size); break;
+ case dwarf::DW_FORM_block4: Asm->emitInt32(Size); break;
case dwarf::DW_FORM_block:
case dwarf::DW_FORM_exprloc:
Asm->EmitULEB128(Size); break;
@@ -742,9 +742,9 @@ unsigned DIEBlock::ComputeSize(const Asm
void DIEBlock::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
switch (Form) {
default: llvm_unreachable("Improper form for block");
- case dwarf::DW_FORM_block1: Asm->EmitInt8(Size); break;
- case dwarf::DW_FORM_block2: Asm->EmitInt16(Size); break;
- case dwarf::DW_FORM_block4: Asm->EmitInt32(Size); break;
+ case dwarf::DW_FORM_block1: Asm->emitInt8(Size); break;
+ case dwarf::DW_FORM_block2: Asm->emitInt16(Size); break;
+ case dwarf::DW_FORM_block4: Asm->emitInt32(Size); break;
case dwarf::DW_FORM_block: Asm->EmitULEB128(Size); break;
case dwarf::DW_FORM_data16: break;
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Mar 29 16:32:54 2018
@@ -1593,13 +1593,13 @@ void DwarfDebug::emitDebugPubSection(boo
Asm->OutStreamer->EmitLabel(BeginLabel);
Asm->OutStreamer->AddComment("DWARF Version");
- Asm->EmitInt16(dwarf::DW_PUBNAMES_VERSION);
+ Asm->emitInt16(dwarf::DW_PUBNAMES_VERSION);
Asm->OutStreamer->AddComment("Offset of Compilation Unit Info");
emitSectionReference(*TheU);
Asm->OutStreamer->AddComment("Compilation Unit Length");
- Asm->EmitInt32(TheU->getLength());
+ Asm->emitInt32(TheU->getLength());
// Emit the pubnames for this compilation unit.
for (const auto &GI : Globals) {
@@ -1607,14 +1607,14 @@ void DwarfDebug::emitDebugPubSection(boo
const DIE *Entity = GI.second;
Asm->OutStreamer->AddComment("DIE offset");
- Asm->EmitInt32(Entity->getOffset());
+ Asm->emitInt32(Entity->getOffset());
if (GnuStyle) {
dwarf::PubIndexEntryDescriptor Desc = computeIndexValue(TheU, Entity);
Asm->OutStreamer->AddComment(
Twine("Kind: ") + dwarf::GDBIndexEntryKindString(Desc.Kind) + ", " +
dwarf::GDBIndexEntryLinkageString(Desc.Linkage));
- Asm->EmitInt8(Desc.toBits());
+ Asm->emitInt8(Desc.toBits());
}
Asm->OutStreamer->AddComment("External Name");
@@ -1622,7 +1622,7 @@ void DwarfDebug::emitDebugPubSection(boo
}
Asm->OutStreamer->AddComment("End Mark");
- Asm->EmitInt32(0);
+ Asm->emitInt32(0);
Asm->OutStreamer->EmitLabel(EndLabel);
}
@@ -1705,7 +1705,7 @@ void DebugLocEntry::finalize(const AsmPr
void DwarfDebug::emitDebugLocEntryLocation(const DebugLocStream::Entry &Entry) {
// Emit the size.
Asm->OutStreamer->AddComment("Loc expr size");
- Asm->EmitInt16(DebugLocs.getBytes(Entry).size());
+ Asm->emitInt16(DebugLocs.getBytes(Entry).size());
// Emit the entry.
APByteStreamer Streamer(*Asm);
@@ -1753,14 +1753,14 @@ void DwarfDebug::emitDebugLocDWO() {
// rather than two. We could get fancier and try to, say, reuse an
// address we know we've emitted elsewhere (the start of the function?
// The start of the CU or CU subrange that encloses this range?)
- Asm->EmitInt8(dwarf::DW_LLE_startx_length);
+ Asm->emitInt8(dwarf::DW_LLE_startx_length);
unsigned idx = AddrPool.getIndex(Entry.BeginSym);
Asm->EmitULEB128(idx);
Asm->EmitLabelDifference(Entry.EndSym, Entry.BeginSym, 4);
emitDebugLocEntryLocation(Entry);
}
- Asm->EmitInt8(dwarf::DW_LLE_end_of_list);
+ Asm->emitInt8(dwarf::DW_LLE_end_of_list);
}
}
@@ -1891,15 +1891,15 @@ void DwarfDebug::emitDebugARanges() {
// For each compile unit, write the list of spans it covers.
Asm->OutStreamer->AddComment("Length of ARange Set");
- Asm->EmitInt32(ContentSize);
+ Asm->emitInt32(ContentSize);
Asm->OutStreamer->AddComment("DWARF Arange version number");
- Asm->EmitInt16(dwarf::DW_ARANGES_VERSION);
+ Asm->emitInt16(dwarf::DW_ARANGES_VERSION);
Asm->OutStreamer->AddComment("Offset Into Debug Info Section");
emitSectionReference(*CU);
Asm->OutStreamer->AddComment("Address Size (in bytes)");
- Asm->EmitInt8(PtrSize);
+ Asm->emitInt8(PtrSize);
Asm->OutStreamer->AddComment("Segment Size (in bytes)");
- Asm->EmitInt8(0);
+ Asm->emitInt8(0);
Asm->OutStreamer->emitFill(Padding, 0xff);
@@ -2032,10 +2032,10 @@ void DwarfDebug::emitMacro(DIMacro &M) {
Asm->OutStreamer->EmitBytes(Name);
if (!Value.empty()) {
// There should be one space between macro name and macro value.
- Asm->EmitInt8(' ');
+ Asm->emitInt8(' ');
Asm->OutStreamer->EmitBytes(Value);
}
- Asm->EmitInt8('\0');
+ Asm->emitInt8('\0');
}
void DwarfDebug::emitMacroFile(DIMacroFile &F, DwarfCompileUnit &U) {
@@ -2068,7 +2068,7 @@ void DwarfDebug::emitDebugMacinfo() {
}
}
Asm->OutStreamer->AddComment("End Of Macro List Mark");
- Asm->EmitInt8(0);
+ Asm->emitInt8(0);
}
// DWARF5 Experimental Separate Dwarf emitters.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfFile.cpp Thu Mar 29 16:32:54 2018
@@ -38,9 +38,9 @@ void DwarfFile::emitStringOffsetsTableHe
// table. The header consists of an entry with the contribution's
// size (not including the size of the header), the DWARF version and
// 2 bytes of padding.
- Asm->EmitInt32(StrPool.size() * EntrySize);
- Asm->EmitInt16(Asm->getDwarfVersion());
- Asm->EmitInt16(0);
+ Asm->emitInt32(StrPool.size() * EntrySize);
+ Asm->emitInt16(Asm->getDwarfVersion());
+ Asm->emitInt16(0);
// Define the symbol that marks the start of the contribution. It is
// referenced by most unit headers via DW_AT_str_offsets_base.
// Split units do not use the attribute.
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Thu Mar 29 16:32:54 2018
@@ -1662,18 +1662,18 @@ DIE *DwarfUnit::getOrCreateStaticMemberD
void DwarfUnit::emitCommonHeader(bool UseOffsets, dwarf::UnitType UT) {
// Emit size of content not including length itself
Asm->OutStreamer->AddComment("Length of Unit");
- Asm->EmitInt32(getHeaderSize() + getUnitDie().getSize());
+ Asm->emitInt32(getHeaderSize() + getUnitDie().getSize());
Asm->OutStreamer->AddComment("DWARF version number");
unsigned Version = DD->getDwarfVersion();
- Asm->EmitInt16(Version);
+ Asm->emitInt16(Version);
// DWARF v5 reorders the address size and adds a unit type.
if (Version >= 5) {
Asm->OutStreamer->AddComment("DWARF Unit Type");
- Asm->EmitInt8(UT);
+ Asm->emitInt8(UT);
Asm->OutStreamer->AddComment("Address Size (in bytes)");
- Asm->EmitInt8(Asm->MAI->getCodePointerSize());
+ Asm->emitInt8(Asm->MAI->getCodePointerSize());
}
// We share one abbreviations table across all units so it's always at the
@@ -1682,14 +1682,14 @@ void DwarfUnit::emitCommonHeader(bool Us
Asm->OutStreamer->AddComment("Offset Into Abbrev. Section");
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
if (UseOffsets)
- Asm->EmitInt32(0);
+ Asm->emitInt32(0);
else
Asm->emitDwarfSymbolReference(
TLOF.getDwarfAbbrevSection()->getBeginSymbol(), false);
if (Version <= 4) {
Asm->OutStreamer->AddComment("Address Size (in bytes)");
- Asm->EmitInt8(Asm->MAI->getCodePointerSize());
+ Asm->emitInt8(Asm->MAI->getCodePointerSize());
}
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp Thu Mar 29 16:32:54 2018
@@ -77,7 +77,7 @@ void ErlangGCPrinter::finishAssembly(Mod
// Emit PointCount.
OS.AddComment("safe point count");
- AP.EmitInt16(MD.size());
+ AP.emitInt16(MD.size());
// And each safe point...
for (GCFunctionInfo::iterator PI = MD.begin(), PE = MD.end(); PI != PE;
@@ -94,7 +94,7 @@ void ErlangGCPrinter::finishAssembly(Mod
// Emit the stack frame size.
OS.AddComment("stack frame size (in words)");
- AP.EmitInt16(MD.getFrameSize() / IntPtrSize);
+ AP.emitInt16(MD.getFrameSize() / IntPtrSize);
// Emit stack arity, i.e. the number of stacked arguments.
unsigned RegisteredArgs = IntPtrSize == 4 ? 5 : 6;
@@ -102,11 +102,11 @@ void ErlangGCPrinter::finishAssembly(Mod
? MD.getFunction().arg_size() - RegisteredArgs
: 0;
OS.AddComment("stack arity");
- AP.EmitInt16(StackArity);
+ AP.emitInt16(StackArity);
// Emit the number of live roots in the function.
OS.AddComment("live root count");
- AP.EmitInt16(MD.live_size(PI));
+ AP.emitInt16(MD.live_size(PI));
// And for each live root...
for (GCFunctionInfo::live_iterator LI = MD.live_begin(PI),
@@ -114,7 +114,7 @@ void ErlangGCPrinter::finishAssembly(Mod
LI != LE; ++LI) {
// Emit live root's offset within the stack frame.
OS.AddComment("stack index (offset / wordsize)");
- AP.EmitInt16(LI->StackOffset / IntPtrSize);
+ AP.emitInt16(LI->StackOffset / IntPtrSize);
}
}
}
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp Thu Mar 29 16:32:54 2018
@@ -129,7 +129,7 @@ void OcamlGCMetadataPrinter::finishAssem
// Very rude!
report_fatal_error(" Too much descriptor for ocaml GC");
}
- AP.EmitInt16(NumDescriptors);
+ AP.emitInt16(NumDescriptors);
AP.EmitAlignment(IntPtrSize == 4 ? 2 : 3);
for (GCModuleInfo::FuncInfoVec::iterator I = Info.funcinfo_begin(),
@@ -166,8 +166,8 @@ void OcamlGCMetadataPrinter::finishAssem
}
AP.OutStreamer->EmitSymbolValue(J->Label, IntPtrSize);
- AP.EmitInt16(FrameSize);
- AP.EmitInt16(LiveCount);
+ AP.emitInt16(FrameSize);
+ AP.emitInt16(LiveCount);
for (GCFunctionInfo::live_iterator K = FI.live_begin(J),
KE = FI.live_end(J);
@@ -178,7 +178,7 @@ void OcamlGCMetadataPrinter::finishAssem
"GC root stack offset is outside of fixed stack frame and out "
"of range for ocaml GC!");
}
- AP.EmitInt16(K->StackOffset);
+ AP.emitInt16(K->StackOffset);
}
AP.EmitAlignment(IntPtrSize == 4 ? 2 : 3);
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Thu Mar 29 16:32:54 2018
@@ -933,12 +933,12 @@ void DwarfStreamer::emitCompileUnitHeade
// Emit size of content not including length itself. The size has already
// been computed in CompileUnit::computeOffsets(). Subtract 4 to that size to
// account for the length field.
- Asm->EmitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset() - 4);
- Asm->EmitInt16(Version);
+ Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset() - 4);
+ Asm->emitInt16(Version);
// We share one abbreviations table across all units so it's always at the
// start of the section.
- Asm->EmitInt32(0);
- Asm->EmitInt8(Unit.getOrigUnit().getAddressByteSize());
+ Asm->emitInt32(0);
+ Asm->emitInt8(Unit.getOrigUnit().getAddressByteSize());
}
/// Emit the \p Abbrevs array as the shared abbreviation table
@@ -967,7 +967,7 @@ void DwarfStreamer::emitStrings(const No
// Emit the string itself.
Asm->OutStreamer->EmitBytes(Entry.getString());
// Emit a null terminator.
- Asm->EmitInt8(0);
+ Asm->emitInt8(0);
}
}
@@ -1089,10 +1089,10 @@ void DwarfStreamer::emitUnitRangesEntrie
Asm->EmitLabelDifference(EndLabel, BeginLabel, 4); // Arange length
Asm->OutStreamer->EmitLabel(BeginLabel);
- Asm->EmitInt16(dwarf::DW_ARANGES_VERSION); // Version number
- Asm->EmitInt32(Unit.getStartOffset()); // Corresponding unit's offset
- Asm->EmitInt8(AddressSize); // Address size
- Asm->EmitInt8(0); // Segment size
+ Asm->emitInt16(dwarf::DW_ARANGES_VERSION); // Version number
+ Asm->emitInt32(Unit.getStartOffset()); // Corresponding unit's offset
+ Asm->emitInt8(AddressSize); // Address size
+ Asm->emitInt8(0); // Segment size
Asm->OutStreamer->emitFill(Padding, 0x0);
@@ -1375,22 +1375,22 @@ void DwarfStreamer::emitPubSectionForUni
// Emit the header.
Asm->EmitLabelDifference(EndLabel, BeginLabel, 4); // Length
Asm->OutStreamer->EmitLabel(BeginLabel);
- Asm->EmitInt16(dwarf::DW_PUBNAMES_VERSION); // Version
- Asm->EmitInt32(Unit.getStartOffset()); // Unit offset
- Asm->EmitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset()); // Size
+ Asm->emitInt16(dwarf::DW_PUBNAMES_VERSION); // Version
+ Asm->emitInt32(Unit.getStartOffset()); // Unit offset
+ Asm->emitInt32(Unit.getNextUnitOffset() - Unit.getStartOffset()); // Size
HeaderEmitted = true;
}
- Asm->EmitInt32(Name.Die->getOffset());
+ Asm->emitInt32(Name.Die->getOffset());
// Emit the string itself.
Asm->OutStreamer->EmitBytes(Name.Name.getString());
// Emit a null terminator.
- Asm->EmitInt8(0);
+ Asm->emitInt8(0);
}
if (!HeaderEmitted)
return;
- Asm->EmitInt32(0); // End marker.
+ Asm->emitInt32(0); // End marker.
Asm->OutStreamer->EmitLabel(EndLabel);
}
Modified: llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp?rev=328848&r1=328847&r2=328848&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/DWARF/DwarfGenerator.cpp Thu Mar 29 16:32:54 2018
@@ -231,15 +231,15 @@ StringRef dwarfgen::Generator::generate(
auto Length = CU->getLength();
MC->setDwarfVersion(Version);
assert(Length != -1U);
- Asm->EmitInt32(Length);
- Asm->EmitInt16(Version);
+ Asm->emitInt32(Length);
+ Asm->emitInt16(Version);
if (Version <= 4) {
- Asm->EmitInt32(0);
- Asm->EmitInt8(CU->getAddressSize());
+ Asm->emitInt32(0);
+ Asm->emitInt8(CU->getAddressSize());
} else {
- Asm->EmitInt8(dwarf::DW_UT_compile);
- Asm->EmitInt8(CU->getAddressSize());
- Asm->EmitInt32(0);
+ Asm->emitInt8(dwarf::DW_UT_compile);
+ Asm->emitInt8(CU->getAddressSize());
+ Asm->emitInt32(0);
}
Asm->emitDwarfDIE(*CU->getUnitDIE().Die);
}
More information about the llvm-commits
mailing list