<p dir="ltr">Thanks! </p>
<div class="gmail_quote">On Jun 4, 2015 6:31 PM, "Jim Grosbach" <<a href="mailto:grosbach@apple.com">grosbach@apple.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: grosbach<br>
Date: Thu Jun 4 17:24:41 2015<br>
New Revision: 239108<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D239108-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=zLWjbw3CsGB-FLtqz1esKtg3KCnWhauCPqb5SFejY6c&e=" target="_blank">http://llvm.org/viewvc/llvm-project?rev=239108&view=rev</a><br>
Log:<br>
MC: Clean up naming in MCObjectWriter. NFC.<br>
<br>
s/WriteObject/writeObject/<br>
s/RecordRelocation/recordRelocation/<br>
s/IsSymbolRefDifferenceFullyResolved/isSymbolRefDifferenceFullyResolved/<br>
s/Write8/write8/<br>
s/WriteLE16/writeLE16/<br>
s/WriteLE32/writeLE32/<br>
s/WriteLE64/writeLE64/<br>
s/WriteBE16/writeBE16/<br>
s/WriteBE32/writeBE32/<br>
s/WriteBE64/writeBE64/<br>
s/Write16/write16/<br>
s/Write32/write32/<br>
s/Write64/write64/<br>
s/WriteZeroes/writeZeroes/<br>
s/WriteBytes/writeBytes/<br>
<br>
Modified:<br>
llvm/trunk/include/llvm/MC/MCMachObjectWriter.h<br>
llvm/trunk/include/llvm/MC/MCObjectWriter.h<br>
llvm/trunk/lib/MC/ELFObjectWriter.cpp<br>
llvm/trunk/lib/MC/MCAssembler.cpp<br>
llvm/trunk/lib/MC/MCExpr.cpp<br>
llvm/trunk/lib/MC/MCObjectWriter.cpp<br>
llvm/trunk/lib/MC/MachObjectWriter.cpp<br>
llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp<br>
llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp<br>
llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp<br>
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp<br>
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp<br>
llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp<br>
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp<br>
llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp<br>
llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp<br>
llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp<br>
llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp<br>
llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp<br>
llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCMachObjectWriter.h<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_MC_MCMachObjectWriter.h-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=A6x9BXE0WOkFCWqiGozYOatLLb7tWmw7pG3L02DMhdc&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCMachObjectWriter.h?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCMachObjectWriter.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCMachObjectWriter.h Thu Jun 4 17:24:41 2015<br>
@@ -62,7 +62,7 @@ public:<br>
/// \name API<br>
/// @{<br>
<br>
- virtual void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
+ virtual void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
const MCAsmLayout &Layout,<br>
const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
@@ -234,7 +234,7 @@ public:<br>
const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue);<br>
<br>
- void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
+ void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment, const MCFixup &Fixup,<br>
MCValue Target, bool &IsPCRel,<br>
uint64_t &FixedValue) override;<br>
@@ -254,12 +254,12 @@ public:<br>
void ExecutePostLayoutBinding(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) override;<br>
<br>
- bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
+ bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
const MCSymbol &SymA,<br>
const MCFragment &FB, bool InSet,<br>
bool IsPCRel) const override;<br>
<br>
- void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
+ void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
};<br>
<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/MC/MCObjectWriter.h<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_include_llvm_MC_MCObjectWriter.h-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=PQb219n1pHumdyL9Sp1FXGB0ViPFiLRaQSWAIGdfTBg&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectWriter.h?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/MC/MCObjectWriter.h (original)<br>
+++ llvm/trunk/include/llvm/MC/MCObjectWriter.h Thu Jun 4 17:24:41 2015<br>
@@ -32,7 +32,7 @@ class MCValue;<br>
/// the object writer to modify the assembler data structures at appropriate<br>
/// points. Once assembly is complete, the object writer is given the<br>
/// MCAssembler instance, which contains all the symbol and section data which<br>
-/// should be emitted as part of WriteObject().<br>
+/// should be emitted as part of writeObject().<br>
///<br>
/// The object writer also contains a number of helper methods for writing<br>
/// binary data to the output stream.<br>
@@ -75,8 +75,8 @@ public:<br>
/// This routine is called by the assembler after layout and relaxation, and<br>
/// post layout binding. The implementation is responsible for storing<br>
/// information about the relocation so that it can be emitted during<br>
- /// WriteObject().<br>
- virtual void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
+ /// writeObject().<br>
+ virtual void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
bool &IsPCRel, uint64_t &FixedValue) = 0;<br>
@@ -86,12 +86,12 @@ public:<br>
///<br>
/// Clients are not required to answer precisely and may conservatively return<br>
/// false, even when a difference is fully resolved.<br>
- bool IsSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,<br>
+ bool isSymbolRefDifferenceFullyResolved(const MCAssembler &Asm,<br>
const MCSymbolRefExpr *A,<br>
const MCSymbolRefExpr *B,<br>
bool InSet) const;<br>
<br>
- virtual bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
+ virtual bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
const MCSymbol &SymA,<br>
const MCFragment &FB,<br>
bool InSet,<br>
@@ -107,57 +107,57 @@ public:<br>
/// This routine is called by the assembler after layout and relaxation is<br>
/// complete, fixups have been evaluated and applied, and relocations<br>
/// generated.<br>
- virtual void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) = 0;<br>
+ virtual void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) = 0;<br>
<br>
/// @}<br>
/// \name Binary Output<br>
/// @{<br>
<br>
- void Write8(uint8_t Value) { OS << char(Value); }<br>
+ void write8(uint8_t Value) { OS << char(Value); }<br>
<br>
- void WriteLE16(uint16_t Value) {<br>
+ void writeLE16(uint16_t Value) {<br>
support::endian::Writer<support::little>(OS).write(Value);<br>
}<br>
<br>
- void WriteLE32(uint32_t Value) {<br>
+ void writeLE32(uint32_t Value) {<br>
support::endian::Writer<support::little>(OS).write(Value);<br>
}<br>
<br>
- void WriteLE64(uint64_t Value) {<br>
+ void writeLE64(uint64_t Value) {<br>
support::endian::Writer<support::little>(OS).write(Value);<br>
}<br>
<br>
- void WriteBE16(uint16_t Value) {<br>
+ void writeBE16(uint16_t Value) {<br>
support::endian::Writer<support::big>(OS).write(Value);<br>
}<br>
<br>
- void WriteBE32(uint32_t Value) {<br>
+ void writeBE32(uint32_t Value) {<br>
support::endian::Writer<support::big>(OS).write(Value);<br>
}<br>
<br>
- void WriteBE64(uint64_t Value) {<br>
+ void writeBE64(uint64_t Value) {<br>
support::endian::Writer<support::big>(OS).write(Value);<br>
}<br>
<br>
- void Write16(uint16_t Value) {<br>
+ void write16(uint16_t Value) {<br>
if (IsLittleEndian)<br>
- WriteLE16(Value);<br>
+ writeLE16(Value);<br>
else<br>
- WriteBE16(Value);<br>
+ writeBE16(Value);<br>
}<br>
<br>
- void Write32(uint32_t Value) {<br>
+ void write32(uint32_t Value) {<br>
if (IsLittleEndian)<br>
- WriteLE32(Value);<br>
+ writeLE32(Value);<br>
else<br>
- WriteBE32(Value);<br>
+ writeBE32(Value);<br>
}<br>
<br>
- void Write64(uint64_t Value) {<br>
+ void write64(uint64_t Value) {<br>
if (IsLittleEndian)<br>
- WriteLE64(Value);<br>
+ writeLE64(Value);<br>
else<br>
- WriteBE64(Value);<br>
+ writeBE64(Value);<br>
}<br>
<br>
void WriteZeros(unsigned N) {<br>
@@ -169,12 +169,12 @@ public:<br>
OS << StringRef(Zeros, N % 16);<br>
}<br>
<br>
- void WriteBytes(const SmallVectorImpl<char> &ByteVec,<br>
+ void writeBytes(const SmallVectorImpl<char> &ByteVec,<br>
unsigned ZeroFillSize = 0) {<br>
- WriteBytes(StringRef(ByteVec.data(), ByteVec.size()), ZeroFillSize);<br>
+ writeBytes(StringRef(ByteVec.data(), ByteVec.size()), ZeroFillSize);<br>
}<br>
<br>
- void WriteBytes(StringRef Str, unsigned ZeroFillSize = 0) {<br>
+ void writeBytes(StringRef Str, unsigned ZeroFillSize = 0) {<br>
// TODO: this version may need to go away once all fragment contents are<br>
// converted to SmallVector<char, N><br>
assert(<br>
<br>
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_ELFObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=rMjqk7W71wYx6olk79ogQ_fUCgyOQNO4-6d09FOHsn8&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -150,9 +150,9 @@ class ELFObjectWriter : public MCObjectW<br>
<br>
void WriteWord(uint64_t W) {<br>
if (is64Bit())<br>
- Write64(W);<br>
+ write64(W);<br>
else<br>
- Write32(W);<br>
+ write32(W);<br>
}<br>
<br>
template <typename T> void write(T Val) {<br>
@@ -176,7 +176,7 @@ class ELFObjectWriter : public MCObjectW<br>
const MCSymbol *Sym, uint64_t C,<br>
unsigned Type) const;<br>
<br>
- void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
+ void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment, const MCFixup &Fixup,<br>
MCValue Target, bool &IsPCRel,<br>
uint64_t &FixedValue) override;<br>
@@ -216,7 +216,7 @@ class ELFObjectWriter : public MCObjectW<br>
<br>
void writeRelocations(const MCAssembler &Asm, const MCSectionELF &Sec);<br>
<br>
- bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
+ bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
const MCSymbol &SymA,<br>
const MCFragment &FB,<br>
bool InSet,<br>
@@ -224,7 +224,7 @@ class ELFObjectWriter : public MCObjectW<br>
<br>
bool isWeak(const MCSymbol &Sym) const override;<br>
<br>
- void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
+ void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
void writeSection(const SectionIndexMapTy &SectionIndexMap,<br>
uint32_t GroupSymbolIndex, uint64_t Offset, uint64_t Size,<br>
const MCSectionELF &Section);<br>
@@ -307,47 +307,47 @@ void ELFObjectWriter::writeHeader(const<br>
// emitWord method behaves differently for ELF32 and ELF64, writing<br>
// 4 bytes in the former and 8 in the latter.<br>
<br>
- WriteBytes(ELF::ElfMagic); // e_ident[EI_MAG0] to e_ident[EI_MAG3]<br>
+ writeBytes(ELF::ElfMagic); // e_ident[EI_MAG0] to e_ident[EI_MAG3]<br>
<br>
- Write8(is64Bit() ? ELF::ELFCLASS64 : ELF::ELFCLASS32); // e_ident[EI_CLASS]<br>
+ write8(is64Bit() ? ELF::ELFCLASS64 : ELF::ELFCLASS32); // e_ident[EI_CLASS]<br>
<br>
// e_ident[EI_DATA]<br>
- Write8(isLittleEndian() ? ELF::ELFDATA2LSB : ELF::ELFDATA2MSB);<br>
+ write8(isLittleEndian() ? ELF::ELFDATA2LSB : ELF::ELFDATA2MSB);<br>
<br>
- Write8(ELF::EV_CURRENT); // e_ident[EI_VERSION]<br>
+ write8(ELF::EV_CURRENT); // e_ident[EI_VERSION]<br>
// e_ident[EI_OSABI]<br>
- Write8(TargetObjectWriter->getOSABI());<br>
- Write8(0); // e_ident[EI_ABIVERSION]<br>
+ write8(TargetObjectWriter->getOSABI());<br>
+ write8(0); // e_ident[EI_ABIVERSION]<br>
<br>
WriteZeros(ELF::EI_NIDENT - ELF::EI_PAD);<br>
<br>
- Write16(ELF::ET_REL); // e_type<br>
+ write16(ELF::ET_REL); // e_type<br>
<br>
- Write16(TargetObjectWriter->getEMachine()); // e_machine = target<br>
+ write16(TargetObjectWriter->getEMachine()); // e_machine = target<br>
<br>
- Write32(ELF::EV_CURRENT); // e_version<br>
+ write32(ELF::EV_CURRENT); // e_version<br>
WriteWord(0); // e_entry, no entry point in .o file<br>
WriteWord(0); // e_phoff, no program header for .o<br>
WriteWord(0); // e_shoff = sec hdr table off in bytes<br>
<br>
// e_flags = whatever the target wants<br>
- Write32(Asm.getELFHeaderEFlags());<br>
+ write32(Asm.getELFHeaderEFlags());<br>
<br>
// e_ehsize = ELF header size<br>
- Write16(is64Bit() ? sizeof(ELF::Elf64_Ehdr) : sizeof(ELF::Elf32_Ehdr));<br>
+ write16(is64Bit() ? sizeof(ELF::Elf64_Ehdr) : sizeof(ELF::Elf32_Ehdr));<br>
<br>
- Write16(0); // e_phentsize = prog header entry size<br>
- Write16(0); // e_phnum = # prog header entries = 0<br>
+ write16(0); // e_phentsize = prog header entry size<br>
+ write16(0); // e_phnum = # prog header entries = 0<br>
<br>
// e_shentsize = Section header entry size<br>
- Write16(is64Bit() ? sizeof(ELF::Elf64_Shdr) : sizeof(ELF::Elf32_Shdr));<br>
+ write16(is64Bit() ? sizeof(ELF::Elf64_Shdr) : sizeof(ELF::Elf32_Shdr));<br>
<br>
// e_shnum = # of section header ents<br>
- Write16(0);<br>
+ write16(0);<br>
<br>
// e_shstrndx = Section # of '.shstrtab'<br>
assert(StringTableIndex < ELF::SHN_LORESERVE);<br>
- Write16(StringTableIndex);<br>
+ write16(StringTableIndex);<br>
}<br>
<br>
uint64_t ELFObjectWriter::SymbolValue(const MCSymbol &Sym,<br>
@@ -605,7 +605,7 @@ static bool isWeak(const MCSymbolELF &Sy<br>
}<br>
}<br>
<br>
-void ELFObjectWriter::RecordRelocation(MCAssembler &Asm,<br>
+void ELFObjectWriter::recordRelocation(MCAssembler &Asm,<br>
const MCAsmLayout &Layout,<br>
const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
@@ -1035,14 +1035,14 @@ void ELFObjectWriter::WriteSecHdrEntry(u<br>
uint32_t Link, uint32_t Info,<br>
uint64_t Alignment,<br>
uint64_t EntrySize) {<br>
- Write32(Name); // sh_name: index into string table<br>
- Write32(Type); // sh_type<br>
+ write32(Name); // sh_name: index into string table<br>
+ write32(Type); // sh_type<br>
WriteWord(Flags); // sh_flags<br>
WriteWord(Address); // sh_addr<br>
WriteWord(Offset); // sh_offset<br>
WriteWord(Size); // sh_size<br>
- Write32(Link); // sh_link<br>
- Write32(Info); // sh_info<br>
+ write32(Link); // sh_link<br>
+ write32(Info); // sh_info<br>
WriteWord(Alignment); // sh_addralign<br>
WriteWord(EntrySize); // sh_entsize<br>
}<br>
@@ -1174,7 +1174,7 @@ void ELFObjectWriter::writeSectionHeader<br>
}<br>
}<br>
<br>
-void ELFObjectWriter::WriteObject(MCAssembler &Asm,<br>
+void ELFObjectWriter::writeObject(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) {<br>
MCContext &Ctx = Asm.getContext();<br>
MCSectionELF *StrtabSection =<br>
@@ -1308,7 +1308,7 @@ void ELFObjectWriter::WriteObject(MCAsse<br>
NumSectionsOffset);<br>
}<br>
<br>
-bool ELFObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(<br>
+bool ELFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(<br>
const MCAssembler &Asm, const MCSymbol &SA, const MCFragment &FB,<br>
bool InSet, bool IsPCRel) const {<br>
const auto &SymA = cast<MCSymbolELF>(SA);<br>
@@ -1317,7 +1317,7 @@ bool ELFObjectWriter::IsSymbolRefDiffere<br>
if (::isWeak(SymA))<br>
return false;<br>
}<br>
- return MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,<br>
+ return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,<br>
InSet, IsPCRel);<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/MC/MCAssembler.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_MCAssembler.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=GJsfSGZughsSKn1rDtyEaM0OFe_sKRtJb3PCAk8HSvU&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCAssembler.cpp Thu Jun 4 17:24:41 2015<br>
@@ -394,7 +394,7 @@ bool MCAssembler::evaluateFixup(const MC<br>
MCValue &Target, uint64_t &Value) const {<br>
++stats::evaluateFixup;<br>
<br>
- // FIXME: This code has some duplication with RecordRelocation. We should<br>
+ // FIXME: This code has some duplication with recordRelocation. We should<br>
// probably merge the two into a single callback that tries to evaluate a<br>
// fixup and records a relocation if one is needed.<br>
const MCExpr *Expr = Fixup.getValue();<br>
@@ -416,7 +416,7 @@ bool MCAssembler::evaluateFixup(const MC<br>
if (A->getKind() != MCSymbolRefExpr::VK_None || SA.isUndefined()) {<br>
IsResolved = false;<br>
} else {<br>
- IsResolved = getWriter().IsSymbolRefDifferenceFullyResolvedImpl(<br>
+ IsResolved = getWriter().isSymbolRefDifferenceFullyResolvedImpl(<br>
*this, SA, *DF, false, true);<br>
}<br>
}<br>
@@ -576,7 +576,7 @@ void MCAsmLayout::layoutFragment(MCFragm<br>
/// a MCEncodedFragment.<br>
static void writeFragmentContents(const MCFragment &F, MCObjectWriter *OW) {<br>
const MCEncodedFragment &EF = cast<MCEncodedFragment>(F);<br>
- OW->WriteBytes(EF.getContents());<br>
+ OW->writeBytes(EF.getContents());<br>
}<br>
<br>
void MCAssembler::registerSymbol(const MCSymbol &Symbol, bool *Created) {<br>
@@ -670,10 +670,10 @@ static void writeFragment(const MCAssemb<br>
for (uint64_t i = 0; i != Count; ++i) {<br>
switch (AF.getValueSize()) {<br>
default: llvm_unreachable("Invalid size!");<br>
- case 1: OW->Write8 (uint8_t (AF.getValue())); break;<br>
- case 2: OW->Write16(uint16_t(AF.getValue())); break;<br>
- case 4: OW->Write32(uint32_t(AF.getValue())); break;<br>
- case 8: OW->Write64(uint64_t(AF.getValue())); break;<br>
+ case 1: OW->write8 (uint8_t (AF.getValue())); break;<br>
+ case 2: OW->write16(uint16_t(AF.getValue())); break;<br>
+ case 4: OW->write32(uint32_t(AF.getValue())); break;<br>
+ case 8: OW->write64(uint64_t(AF.getValue())); break;<br>
}<br>
}<br>
break;<br>
@@ -703,10 +703,10 @@ static void writeFragment(const MCAssemb<br>
for (uint64_t i = 0, e = FF.getSize() / FF.getValueSize(); i != e; ++i) {<br>
switch (FF.getValueSize()) {<br>
default: llvm_unreachable("Invalid size!");<br>
- case 1: OW->Write8 (uint8_t (FF.getValue())); break;<br>
- case 2: OW->Write16(uint16_t(FF.getValue())); break;<br>
- case 4: OW->Write32(uint32_t(FF.getValue())); break;<br>
- case 8: OW->Write64(uint64_t(FF.getValue())); break;<br>
+ case 1: OW->write8 (uint8_t (FF.getValue())); break;<br>
+ case 2: OW->write16(uint16_t(FF.getValue())); break;<br>
+ case 4: OW->write32(uint32_t(FF.getValue())); break;<br>
+ case 8: OW->write64(uint64_t(FF.getValue())); break;<br>
}<br>
}<br>
break;<br>
@@ -714,13 +714,13 @@ static void writeFragment(const MCAssemb<br>
<br>
case MCFragment::FT_LEB: {<br>
const MCLEBFragment &LF = cast<MCLEBFragment>(F);<br>
- OW->WriteBytes(LF.getContents());<br>
+ OW->writeBytes(LF.getContents());<br>
break;<br>
}<br>
<br>
case MCFragment::FT_SafeSEH: {<br>
const MCSafeSEHFragment &SF = cast<MCSafeSEHFragment>(F);<br>
- OW->Write32(SF.getSymbol()->getIndex());<br>
+ OW->write32(SF.getSymbol()->getIndex());<br>
break;<br>
}<br>
<br>
@@ -729,19 +729,19 @@ static void writeFragment(const MCAssemb<br>
const MCOrgFragment &OF = cast<MCOrgFragment>(F);<br>
<br>
for (uint64_t i = 0, e = FragmentSize; i != e; ++i)<br>
- OW->Write8(uint8_t(OF.getValue()));<br>
+ OW->write8(uint8_t(OF.getValue()));<br>
<br>
break;<br>
}<br>
<br>
case MCFragment::FT_Dwarf: {<br>
const MCDwarfLineAddrFragment &OF = cast<MCDwarfLineAddrFragment>(F);<br>
- OW->WriteBytes(OF.getContents());<br>
+ OW->writeBytes(OF.getContents());<br>
break;<br>
}<br>
case MCFragment::FT_DwarfFrame: {<br>
const MCDwarfCallFrameFragment &CF = cast<MCDwarfCallFrameFragment>(F);<br>
- OW->WriteBytes(CF.getContents());<br>
+ OW->writeBytes(CF.getContents());<br>
break;<br>
}<br>
}<br>
@@ -819,7 +819,7 @@ std::pair<uint64_t, bool> MCAssembler::h<br>
// The fixup was unresolved, we need a relocation. Inform the object<br>
// writer of the relocation, and give it an opportunity to adjust the<br>
// fixup value if need be.<br>
- getWriter().RecordRelocation(*this, Layout, &F, Fixup, Target, IsPCRel,<br>
+ getWriter().recordRelocation(*this, Layout, &F, Fixup, Target, IsPCRel,<br>
FixedValue);<br>
}<br>
return std::make_pair(FixedValue, IsPCRel);<br>
@@ -897,7 +897,7 @@ void MCAssembler::Finish() {<br>
}<br>
<br>
// Write the object file.<br>
- getWriter().WriteObject(*this, Layout);<br>
+ getWriter().writeObject(*this, Layout);<br>
<br>
stats::ObjectBytes += OS.tell() - StartOffset;<br>
}<br>
<br>
Modified: llvm/trunk/lib/MC/MCExpr.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_MCExpr.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=pAapzxUUoaOzyd6iWpI98C9s6C5c0cmlELGSNxaQZOg&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCExpr.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCExpr.cpp Thu Jun 4 17:24:41 2015<br>
@@ -468,7 +468,7 @@ static void AttemptToFoldSymbolOffsetDif<br>
if (SA.isUndefined() || SB.isUndefined())<br>
return;<br>
<br>
- if (!Asm->getWriter().IsSymbolRefDifferenceFullyResolved(*Asm, A, B, InSet))<br>
+ if (!Asm->getWriter().isSymbolRefDifferenceFullyResolved(*Asm, A, B, InSet))<br>
return;<br>
<br>
if (SA.getFragment() == SB.getFragment()) {<br>
<br>
Modified: llvm/trunk/lib/MC/MCObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_MCObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=d5AuRgnOPEETHbWFaAiGtBhUo6EDvIKxzGhjC80I0qQ&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MCObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/MCObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -17,7 +17,7 @@ using namespace llvm;<br>
MCObjectWriter::~MCObjectWriter() {<br>
}<br>
<br>
-bool MCObjectWriter::IsSymbolRefDifferenceFullyResolved(<br>
+bool MCObjectWriter::isSymbolRefDifferenceFullyResolved(<br>
const MCAssembler &Asm, const MCSymbolRefExpr *A, const MCSymbolRefExpr *B,<br>
bool InSet) const {<br>
// Modified symbol references cannot be resolved.<br>
@@ -33,11 +33,11 @@ bool MCObjectWriter::IsSymbolRefDifferen<br>
if (!SA.getFragment() || !SB.getFragment())<br>
return false;<br>
<br>
- return IsSymbolRefDifferenceFullyResolvedImpl(Asm, SA, *SB.getFragment(),<br>
+ return isSymbolRefDifferenceFullyResolvedImpl(Asm, SA, *SB.getFragment(),<br>
InSet, false);<br>
}<br>
<br>
-bool MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(<br>
+bool MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(<br>
const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB,<br>
bool InSet, bool IsPCRel) const {<br>
const MCSection &SecA = SymA.getSection();<br>
<br>
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_MachObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=uqYTMdnD46K1IYEwEnUcvDcayZW9epHrMbfC1riAdCE&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -132,17 +132,17 @@ void MachObjectWriter::WriteHeader(unsig<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- Write32(is64Bit() ? MachO::MH_MAGIC_64 : MachO::MH_MAGIC);<br>
+ write32(is64Bit() ? MachO::MH_MAGIC_64 : MachO::MH_MAGIC);<br>
<br>
- Write32(TargetObjectWriter->getCPUType());<br>
- Write32(TargetObjectWriter->getCPUSubtype());<br>
+ write32(TargetObjectWriter->getCPUType());<br>
+ write32(TargetObjectWriter->getCPUSubtype());<br>
<br>
- Write32(MachO::MH_OBJECT);<br>
- Write32(NumLoadCommands);<br>
- Write32(LoadCommandsSize);<br>
- Write32(Flags);<br>
+ write32(MachO::MH_OBJECT);<br>
+ write32(NumLoadCommands);<br>
+ write32(LoadCommandsSize);<br>
+ write32(Flags);<br>
if (is64Bit())<br>
- Write32(0); // reserved<br>
+ write32(0); // reserved<br>
<br>
assert(OS.tell() - Start ==<br>
(is64Bit()?sizeof(MachO::mach_header_64): sizeof(MachO::mach_header)));<br>
@@ -165,29 +165,29 @@ void MachObjectWriter::WriteSegmentLoadC<br>
unsigned SegmentLoadCommandSize =<br>
is64Bit() ? sizeof(MachO::segment_command_64):<br>
sizeof(MachO::segment_command);<br>
- Write32(is64Bit() ? MachO::LC_SEGMENT_64 : MachO::LC_SEGMENT);<br>
- Write32(SegmentLoadCommandSize +<br>
+ write32(is64Bit() ? MachO::LC_SEGMENT_64 : MachO::LC_SEGMENT);<br>
+ write32(SegmentLoadCommandSize +<br>
NumSections * (is64Bit() ? sizeof(MachO::section_64) :<br>
sizeof(MachO::section)));<br>
<br>
- WriteBytes("", 16);<br>
+ writeBytes("", 16);<br>
if (is64Bit()) {<br>
- Write64(0); // vmaddr<br>
- Write64(VMSize); // vmsize<br>
- Write64(SectionDataStartOffset); // file offset<br>
- Write64(SectionDataSize); // file size<br>
+ write64(0); // vmaddr<br>
+ write64(VMSize); // vmsize<br>
+ write64(SectionDataStartOffset); // file offset<br>
+ write64(SectionDataSize); // file size<br>
} else {<br>
- Write32(0); // vmaddr<br>
- Write32(VMSize); // vmsize<br>
- Write32(SectionDataStartOffset); // file offset<br>
- Write32(SectionDataSize); // file size<br>
+ write32(0); // vmaddr<br>
+ write32(VMSize); // vmsize<br>
+ write32(SectionDataStartOffset); // file offset<br>
+ write32(SectionDataSize); // file size<br>
}<br>
// maxprot<br>
- Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE);<br>
+ write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE);<br>
// initprot<br>
- Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE);<br>
- Write32(NumSections);<br>
- Write32(0); // flags<br>
+ write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE);<br>
+ write32(NumSections);<br>
+ write32(0); // flags<br>
<br>
assert(OS.tell() - Start == SegmentLoadCommandSize);<br>
}<br>
@@ -212,30 +212,30 @@ void MachObjectWriter::WriteSection(cons<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- WriteBytes(Section.getSectionName(), 16);<br>
- WriteBytes(Section.getSegmentName(), 16);<br>
+ writeBytes(Section.getSectionName(), 16);<br>
+ writeBytes(Section.getSegmentName(), 16);<br>
if (is64Bit()) {<br>
- Write64(getSectionAddress(&Sec)); // address<br>
- Write64(SectionSize); // size<br>
+ write64(getSectionAddress(&Sec)); // address<br>
+ write64(SectionSize); // size<br>
} else {<br>
- Write32(getSectionAddress(&Sec)); // address<br>
- Write32(SectionSize); // size<br>
+ write32(getSectionAddress(&Sec)); // address<br>
+ write32(SectionSize); // size<br>
}<br>
- Write32(FileOffset);<br>
+ write32(FileOffset);<br>
<br>
unsigned Flags = Section.getTypeAndAttributes();<br>
if (Section.hasInstructions())<br>
Flags |= MachO::S_ATTR_SOME_INSTRUCTIONS;<br>
<br>
assert(isPowerOf2_32(Section.getAlignment()) && "Invalid alignment!");<br>
- Write32(Log2_32(Section.getAlignment()));<br>
- Write32(NumRelocations ? RelocationsStart : 0);<br>
- Write32(NumRelocations);<br>
- Write32(Flags);<br>
- Write32(IndirectSymBase.lookup(&Sec)); // reserved1<br>
- Write32(Section.getStubSize()); // reserved2<br>
+ write32(Log2_32(Section.getAlignment()));<br>
+ write32(NumRelocations ? RelocationsStart : 0);<br>
+ write32(NumRelocations);<br>
+ write32(Flags);<br>
+ write32(IndirectSymBase.lookup(&Sec)); // reserved1<br>
+ write32(Section.getStubSize()); // reserved2<br>
if (is64Bit())<br>
- Write32(0); // reserved3<br>
+ write32(0); // reserved3<br>
<br>
assert(OS.tell() - Start == (is64Bit() ? sizeof(MachO::section_64) :<br>
sizeof(MachO::section)));<br>
@@ -250,12 +250,12 @@ void MachObjectWriter::WriteSymtabLoadCo<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- Write32(MachO::LC_SYMTAB);<br>
- Write32(sizeof(MachO::symtab_command));<br>
- Write32(SymbolOffset);<br>
- Write32(NumSymbols);<br>
- Write32(StringTableOffset);<br>
- Write32(StringTableSize);<br>
+ write32(MachO::LC_SYMTAB);<br>
+ write32(sizeof(MachO::symtab_command));<br>
+ write32(SymbolOffset);<br>
+ write32(NumSymbols);<br>
+ write32(StringTableOffset);<br>
+ write32(StringTableSize);<br>
<br>
assert(OS.tell() - Start == sizeof(MachO::symtab_command));<br>
}<br>
@@ -273,26 +273,26 @@ void MachObjectWriter::WriteDysymtabLoad<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- Write32(MachO::LC_DYSYMTAB);<br>
- Write32(sizeof(MachO::dysymtab_command));<br>
- Write32(FirstLocalSymbol);<br>
- Write32(NumLocalSymbols);<br>
- Write32(FirstExternalSymbol);<br>
- Write32(NumExternalSymbols);<br>
- Write32(FirstUndefinedSymbol);<br>
- Write32(NumUndefinedSymbols);<br>
- Write32(0); // tocoff<br>
- Write32(0); // ntoc<br>
- Write32(0); // modtaboff<br>
- Write32(0); // nmodtab<br>
- Write32(0); // extrefsymoff<br>
- Write32(0); // nextrefsyms<br>
- Write32(IndirectSymbolOffset);<br>
- Write32(NumIndirectSymbols);<br>
- Write32(0); // extreloff<br>
- Write32(0); // nextrel<br>
- Write32(0); // locreloff<br>
- Write32(0); // nlocrel<br>
+ write32(MachO::LC_DYSYMTAB);<br>
+ write32(sizeof(MachO::dysymtab_command));<br>
+ write32(FirstLocalSymbol);<br>
+ write32(NumLocalSymbols);<br>
+ write32(FirstExternalSymbol);<br>
+ write32(NumExternalSymbols);<br>
+ write32(FirstUndefinedSymbol);<br>
+ write32(NumUndefinedSymbols);<br>
+ write32(0); // tocoff<br>
+ write32(0); // ntoc<br>
+ write32(0); // modtaboff<br>
+ write32(0); // nmodtab<br>
+ write32(0); // extrefsymoff<br>
+ write32(0); // nextrefsyms<br>
+ write32(IndirectSymbolOffset);<br>
+ write32(NumIndirectSymbols);<br>
+ write32(0); // extreloff<br>
+ write32(0); // nextrel<br>
+ write32(0); // locreloff<br>
+ write32(0); // nlocrel<br>
<br>
assert(OS.tell() - Start == sizeof(MachO::dysymtab_command));<br>
}<br>
@@ -390,17 +390,17 @@ void MachObjectWriter::WriteNlist(MachSy<br>
<br>
// struct nlist (12 bytes)<br>
<br>
- Write32(MSD.StringIndex);<br>
- Write8(Type);<br>
- Write8(SectionIndex);<br>
+ write32(MSD.StringIndex);<br>
+ write8(Type);<br>
+ write8(SectionIndex);<br>
<br>
// The Mach-O streamer uses the lowest 16-bits of the flags for the 'desc'<br>
// value.<br>
- Write16(Flags);<br>
+ write16(Flags);<br>
if (is64Bit())<br>
- Write64(Address);<br>
+ write64(Address);<br>
else<br>
- Write32(Address);<br>
+ write32(Address);<br>
}<br>
<br>
void MachObjectWriter::WriteLinkeditLoadCommand(uint32_t Type,<br>
@@ -409,10 +409,10 @@ void MachObjectWriter::WriteLinkeditLoad<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- Write32(Type);<br>
- Write32(sizeof(MachO::linkedit_data_command));<br>
- Write32(DataOffset);<br>
- Write32(DataSize);<br>
+ write32(Type);<br>
+ write32(sizeof(MachO::linkedit_data_command));<br>
+ write32(DataOffset);<br>
+ write32(DataSize);<br>
<br>
assert(OS.tell() - Start == sizeof(MachO::linkedit_data_command));<br>
}<br>
@@ -433,28 +433,28 @@ void MachObjectWriter::WriteLinkerOption<br>
uint64_t Start = OS.tell();<br>
(void) Start;<br>
<br>
- Write32(MachO::LC_LINKER_OPTION);<br>
- Write32(Size);<br>
- Write32(Options.size());<br>
+ write32(MachO::LC_LINKER_OPTION);<br>
+ write32(Size);<br>
+ write32(Options.size());<br>
uint64_t BytesWritten = sizeof(MachO::linker_option_command);<br>
for (const std::string &Option : Options) {<br>
// Write each string, including the null byte.<br>
- WriteBytes(Option.c_str(), Option.size() + 1);<br>
+ writeBytes(Option.c_str(), Option.size() + 1);<br>
BytesWritten += Option.size() + 1;<br>
}<br>
<br>
// Pad to a multiple of the pointer size.<br>
- WriteBytes("", OffsetToAlignment(BytesWritten, is64Bit() ? 8 : 4));<br>
+ writeBytes("", OffsetToAlignment(BytesWritten, is64Bit() ? 8 : 4));<br>
<br>
assert(OS.tell() - Start == Size);<br>
}<br>
<br>
-void MachObjectWriter::RecordRelocation(MCAssembler &Asm,<br>
+void MachObjectWriter::recordRelocation(MCAssembler &Asm,<br>
const MCAsmLayout &Layout,<br>
const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
bool &IsPCRel, uint64_t &FixedValue) {<br>
- TargetObjectWriter->RecordRelocation(this, Asm, Layout, Fragment, Fixup,<br>
+ TargetObjectWriter->recordRelocation(this, Asm, Layout, Fragment, Fixup,<br>
Target, FixedValue);<br>
}<br>
<br>
@@ -644,7 +644,7 @@ void MachObjectWriter::ExecutePostLayout<br>
BindIndirectSymbols(Asm);<br>
}<br>
<br>
-bool MachObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(<br>
+bool MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(<br>
const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB,<br>
bool InSet, bool IsPCRel) const {<br>
if (InSet)<br>
@@ -711,7 +711,7 @@ bool MachObjectWriter::IsSymbolRefDiffer<br>
return false;<br>
}<br>
<br>
-void MachObjectWriter::WriteObject(MCAssembler &Asm,<br>
+void MachObjectWriter::writeObject(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) {<br>
// Compute symbol table information and bind symbol indices.<br>
ComputeSymbolTable(Asm, LocalSymbolData, ExternalSymbolData,<br>
@@ -815,11 +815,11 @@ void MachObjectWriter::WriteObject(MCAss<br>
assert(VersionInfo.Major < 65536 && "unencodable major target version");<br>
uint32_t EncodedVersion = VersionInfo.Update | (VersionInfo.Minor << 8) |<br>
(VersionInfo.Major << 16);<br>
- Write32(VersionInfo.Kind == MCVM_OSXVersionMin ? MachO::LC_VERSION_MIN_MACOSX :<br>
+ write32(VersionInfo.Kind == MCVM_OSXVersionMin ? MachO::LC_VERSION_MIN_MACOSX :<br>
MachO::LC_VERSION_MIN_IPHONEOS);<br>
- Write32(sizeof(MachO::version_min_command));<br>
- Write32(EncodedVersion);<br>
- Write32(0); // reserved.<br>
+ write32(sizeof(MachO::version_min_command));<br>
+ write32(EncodedVersion);<br>
+ write32(0); // reserved.<br>
}<br>
<br>
// Write the data-in-code load command, if used.<br>
@@ -893,8 +893,8 @@ void MachObjectWriter::WriteObject(MCAss<br>
// (approximately, the exact algorithm is more complicated than this).<br>
std::vector<RelAndSymbol> &Relocs = Relocations[&Sec];<br>
for (const RelAndSymbol &Rel : make_range(Relocs.rbegin(), Relocs.rend())) {<br>
- Write32(Rel.MRE.r_word0);<br>
- Write32(Rel.MRE.r_word1);<br>
+ write32(Rel.MRE.r_word0);<br>
+ write32(Rel.MRE.r_word1);<br>
}<br>
}<br>
<br>
@@ -910,9 +910,9 @@ void MachObjectWriter::WriteObject(MCAss<br>
<< " end: " << End << "(" << Data->End->getName() << ")"<br>
<< " size: " << End - Start<br>
<< "\n");<br>
- Write32(Start);<br>
- Write16(End - Start);<br>
- Write16(Data->Kind);<br>
+ write32(Start);<br>
+ write16(End - Start);<br>
+ write16(Data->Kind);<br>
}<br>
<br>
// Write out the loh commands, if there is one.<br>
@@ -922,7 +922,7 @@ void MachObjectWriter::WriteObject(MCAss<br>
#endif<br>
Asm.getLOHContainer().emit(*this, Layout);<br>
// Pad to a multiple of the pointer size.<br>
- WriteBytes("", OffsetToAlignment(LOHRawSize, is64Bit() ? 8 : 4));<br>
+ writeBytes("", OffsetToAlignment(LOHRawSize, is64Bit() ? 8 : 4));<br>
assert(OS.tell() - Start == LOHSize);<br>
}<br>
<br>
@@ -942,12 +942,12 @@ void MachObjectWriter::WriteObject(MCAss<br>
uint32_t Flags = MachO::INDIRECT_SYMBOL_LOCAL;<br>
if (it->Symbol->isAbsolute())<br>
Flags |= MachO::INDIRECT_SYMBOL_ABS;<br>
- Write32(Flags);<br>
+ write32(Flags);<br>
continue;<br>
}<br>
}<br>
<br>
- Write32(it->Symbol->getIndex());<br>
+ write32(it->Symbol->getIndex());<br>
}<br>
<br>
// FIXME: Check that offsets match computed ones.<br>
<br>
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_WinCOFFObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=9x6Z8e660aiFBeLsC--G7aosUDasrGfq5W5yOereFOw&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -177,19 +177,19 @@ public:<br>
void ExecutePostLayoutBinding(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) override;<br>
<br>
- bool IsSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
+ bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm,<br>
const MCSymbol &SymA,<br>
const MCFragment &FB, bool InSet,<br>
bool IsPCRel) const override;<br>
<br>
bool isWeak(const MCSymbol &Sym) const override;<br>
<br>
- void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
+ void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment, const MCFixup &Fixup,<br>
MCValue Target, bool &IsPCRel,<br>
uint64_t &FixedValue) override;<br>
<br>
- void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
+ void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
};<br>
}<br>
<br>
@@ -546,40 +546,40 @@ bool WinCOFFObjectWriter::IsPhysicalSect<br>
<br>
void WinCOFFObjectWriter::WriteFileHeader(const COFF::header &Header) {<br>
if (UseBigObj) {<br>
- WriteLE16(COFF::IMAGE_FILE_MACHINE_UNKNOWN);<br>
- WriteLE16(0xFFFF);<br>
- WriteLE16(COFF::BigObjHeader::MinBigObjectVersion);<br>
- WriteLE16(Header.Machine);<br>
- WriteLE32(Header.TimeDateStamp);<br>
- WriteBytes(StringRef(COFF::BigObjMagic, sizeof(COFF::BigObjMagic)));<br>
- WriteLE32(0);<br>
- WriteLE32(0);<br>
- WriteLE32(0);<br>
- WriteLE32(0);<br>
- WriteLE32(Header.NumberOfSections);<br>
- WriteLE32(Header.PointerToSymbolTable);<br>
- WriteLE32(Header.NumberOfSymbols);<br>
+ writeLE16(COFF::IMAGE_FILE_MACHINE_UNKNOWN);<br>
+ writeLE16(0xFFFF);<br>
+ writeLE16(COFF::BigObjHeader::MinBigObjectVersion);<br>
+ writeLE16(Header.Machine);<br>
+ writeLE32(Header.TimeDateStamp);<br>
+ writeBytes(StringRef(COFF::BigObjMagic, sizeof(COFF::BigObjMagic)));<br>
+ writeLE32(0);<br>
+ writeLE32(0);<br>
+ writeLE32(0);<br>
+ writeLE32(0);<br>
+ writeLE32(Header.NumberOfSections);<br>
+ writeLE32(Header.PointerToSymbolTable);<br>
+ writeLE32(Header.NumberOfSymbols);<br>
} else {<br>
- WriteLE16(Header.Machine);<br>
- WriteLE16(static_cast<int16_t>(Header.NumberOfSections));<br>
- WriteLE32(Header.TimeDateStamp);<br>
- WriteLE32(Header.PointerToSymbolTable);<br>
- WriteLE32(Header.NumberOfSymbols);<br>
- WriteLE16(Header.SizeOfOptionalHeader);<br>
- WriteLE16(Header.Characteristics);<br>
+ writeLE16(Header.Machine);<br>
+ writeLE16(static_cast<int16_t>(Header.NumberOfSections));<br>
+ writeLE32(Header.TimeDateStamp);<br>
+ writeLE32(Header.PointerToSymbolTable);<br>
+ writeLE32(Header.NumberOfSymbols);<br>
+ writeLE16(Header.SizeOfOptionalHeader);<br>
+ writeLE16(Header.Characteristics);<br>
}<br>
}<br>
<br>
void WinCOFFObjectWriter::WriteSymbol(const COFFSymbol &S) {<br>
- WriteBytes(StringRef(<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__S.Data.Name&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=vZ9bwOcMQpHMq0eUKcz5LASPmk9kIMSxY2PglA-clA0&e=" target="_blank">S.Data.Name</a>, COFF::NameSize));<br>
- WriteLE32(S.Data.Value);<br>
+ writeBytes(StringRef(<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__S.Data.Name&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=vZ9bwOcMQpHMq0eUKcz5LASPmk9kIMSxY2PglA-clA0&e=" target="_blank">S.Data.Name</a>, COFF::NameSize));<br>
+ writeLE32(S.Data.Value);<br>
if (UseBigObj)<br>
- WriteLE32(S.Data.SectionNumber);<br>
+ writeLE32(S.Data.SectionNumber);<br>
else<br>
- WriteLE16(static_cast<int16_t>(S.Data.SectionNumber));<br>
- WriteLE16(S.Data.Type);<br>
- Write8(S.Data.StorageClass);<br>
- Write8(S.Data.NumberOfAuxSymbols);<br>
+ writeLE16(static_cast<int16_t>(S.Data.SectionNumber));<br>
+ writeLE16(S.Data.Type);<br>
+ write8(S.Data.StorageClass);<br>
+ write8(S.Data.NumberOfAuxSymbols);<br>
WriteAuxiliarySymbols(S.Aux);<br>
}<br>
<br>
@@ -589,44 +589,44 @@ void WinCOFFObjectWriter::WriteAuxiliary<br>
i != e; ++i) {<br>
switch (i->AuxType) {<br>
case ATFunctionDefinition:<br>
- WriteLE32(i->Aux.FunctionDefinition.TagIndex);<br>
- WriteLE32(i->Aux.FunctionDefinition.TotalSize);<br>
- WriteLE32(i->Aux.FunctionDefinition.PointerToLinenumber);<br>
- WriteLE32(i->Aux.FunctionDefinition.PointerToNextFunction);<br>
+ writeLE32(i->Aux.FunctionDefinition.TagIndex);<br>
+ writeLE32(i->Aux.FunctionDefinition.TotalSize);<br>
+ writeLE32(i->Aux.FunctionDefinition.PointerToLinenumber);<br>
+ writeLE32(i->Aux.FunctionDefinition.PointerToNextFunction);<br>
WriteZeros(sizeof(i->Aux.FunctionDefinition.unused));<br>
if (UseBigObj)<br>
WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size);<br>
break;<br>
case ATbfAndefSymbol:<br>
WriteZeros(sizeof(i->Aux.bfAndefSymbol.unused1));<br>
- WriteLE16(i->Aux.bfAndefSymbol.Linenumber);<br>
+ writeLE16(i->Aux.bfAndefSymbol.Linenumber);<br>
WriteZeros(sizeof(i->Aux.bfAndefSymbol.unused2));<br>
- WriteLE32(i->Aux.bfAndefSymbol.PointerToNextFunction);<br>
+ writeLE32(i->Aux.bfAndefSymbol.PointerToNextFunction);<br>
WriteZeros(sizeof(i->Aux.bfAndefSymbol.unused3));<br>
if (UseBigObj)<br>
WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size);<br>
break;<br>
case ATWeakExternal:<br>
- WriteLE32(i->Aux.WeakExternal.TagIndex);<br>
- WriteLE32(i->Aux.WeakExternal.Characteristics);<br>
+ writeLE32(i->Aux.WeakExternal.TagIndex);<br>
+ writeLE32(i->Aux.WeakExternal.Characteristics);<br>
WriteZeros(sizeof(i->Aux.WeakExternal.unused));<br>
if (UseBigObj)<br>
WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size);<br>
break;<br>
case ATFile:<br>
- WriteBytes(<br>
+ writeBytes(<br>
StringRef(reinterpret_cast<const char *>(&i->Aux),<br>
UseBigObj ? COFF::Symbol32Size : COFF::Symbol16Size));<br>
break;<br>
case ATSectionDefinition:<br>
- WriteLE32(i->Aux.SectionDefinition.Length);<br>
- WriteLE16(i->Aux.SectionDefinition.NumberOfRelocations);<br>
- WriteLE16(i->Aux.SectionDefinition.NumberOfLinenumbers);<br>
- WriteLE32(i->Aux.SectionDefinition.CheckSum);<br>
- WriteLE16(static_cast<int16_t>(i->Aux.SectionDefinition.Number));<br>
- Write8(i->Aux.SectionDefinition.Selection);<br>
+ writeLE32(i->Aux.SectionDefinition.Length);<br>
+ writeLE16(i->Aux.SectionDefinition.NumberOfRelocations);<br>
+ writeLE16(i->Aux.SectionDefinition.NumberOfLinenumbers);<br>
+ writeLE32(i->Aux.SectionDefinition.CheckSum);<br>
+ writeLE16(static_cast<int16_t>(i->Aux.SectionDefinition.Number));<br>
+ write8(i->Aux.SectionDefinition.Selection);<br>
WriteZeros(sizeof(i->Aux.SectionDefinition.unused));<br>
- WriteLE16(static_cast<int16_t>(i->Aux.SectionDefinition.Number >> 16));<br>
+ writeLE16(static_cast<int16_t>(i->Aux.SectionDefinition.Number >> 16));<br>
if (UseBigObj)<br>
WriteZeros(COFF::Symbol32Size - COFF::Symbol16Size);<br>
break;<br>
@@ -635,23 +635,23 @@ void WinCOFFObjectWriter::WriteAuxiliary<br>
}<br>
<br>
void WinCOFFObjectWriter::WriteSectionHeader(const COFF::section &S) {<br>
- WriteBytes(StringRef(S.Name, COFF::NameSize));<br>
+ writeBytes(StringRef(S.Name, COFF::NameSize));<br>
<br>
- WriteLE32(S.VirtualSize);<br>
- WriteLE32(S.VirtualAddress);<br>
- WriteLE32(S.SizeOfRawData);<br>
- WriteLE32(S.PointerToRawData);<br>
- WriteLE32(S.PointerToRelocations);<br>
- WriteLE32(S.PointerToLineNumbers);<br>
- WriteLE16(S.NumberOfRelocations);<br>
- WriteLE16(S.NumberOfLineNumbers);<br>
- WriteLE32(S.Characteristics);<br>
+ writeLE32(S.VirtualSize);<br>
+ writeLE32(S.VirtualAddress);<br>
+ writeLE32(S.SizeOfRawData);<br>
+ writeLE32(S.PointerToRawData);<br>
+ writeLE32(S.PointerToRelocations);<br>
+ writeLE32(S.PointerToLineNumbers);<br>
+ writeLE16(S.NumberOfRelocations);<br>
+ writeLE16(S.NumberOfLineNumbers);<br>
+ writeLE32(S.Characteristics);<br>
}<br>
<br>
void WinCOFFObjectWriter::WriteRelocation(const COFF::relocation &R) {<br>
- WriteLE32(R.VirtualAddress);<br>
- WriteLE32(R.SymbolTableIndex);<br>
- WriteLE16(R.Type);<br>
+ writeLE32(R.VirtualAddress);<br>
+ writeLE32(R.SymbolTableIndex);<br>
+ writeLE16(R.Type);<br>
}<br>
<br>
////////////////////////////////////////////////////////////////////////////////<br>
@@ -669,7 +669,7 @@ void WinCOFFObjectWriter::ExecutePostLay<br>
DefineSymbol(Symbol, Asm, Layout);<br>
}<br>
<br>
-bool WinCOFFObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(<br>
+bool WinCOFFObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(<br>
const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB,<br>
bool InSet, bool IsPCRel) const {<br>
// MS LINK expects to be able to replace all references to a function with a<br>
@@ -678,7 +678,7 @@ bool WinCOFFObjectWriter::IsSymbolRefDif<br>
if ((((SymA.getFlags() & COFF::SF_TypeMask) >> COFF::SF_TypeShift) >><br>
COFF::SCT_COMPLEX_TYPE_SHIFT) == COFF::IMAGE_SYM_DTYPE_FUNCTION)<br>
return false;<br>
- return MCObjectWriter::IsSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,<br>
+ return MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(Asm, SymA, FB,<br>
InSet, IsPCRel);<br>
}<br>
<br>
@@ -699,7 +699,7 @@ bool WinCOFFObjectWriter::isWeak(const M<br>
return true;<br>
}<br>
<br>
-void WinCOFFObjectWriter::RecordRelocation(<br>
+void WinCOFFObjectWriter::recordRelocation(<br>
MCAssembler &Asm, const MCAsmLayout &Layout, const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target, bool &IsPCRel, uint64_t &FixedValue) {<br>
assert(Target.getSymA() && "Relocation must reference a symbol!");<br>
@@ -830,7 +830,7 @@ void WinCOFFObjectWriter::RecordRelocati<br>
coff_section->Relocations.push_back(Reloc);<br>
}<br>
<br>
-void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm,<br>
+void WinCOFFObjectWriter::writeObject(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) {<br>
size_t SectionsSize = Sections.size();<br>
if (SectionsSize > static_cast<size_t>(INT32_MAX))<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_AArch64_MCTargetDesc_AArch64AsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=Qa-9SbGhWJyW4-cHfktyAJbCVxMvQt_bcYVjVeiB2uE&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -252,7 +252,7 @@ bool AArch64AsmBackend::writeNopData(uin<br>
// We are properly aligned, so write NOPs as requested.<br>
Count /= 4;<br>
for (uint64_t i = 0; i != Count; ++i)<br>
- OW->Write32(0xd503201f);<br>
+ OW->write32(0xd503201f);<br>
return true;<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_AArch64_MCTargetDesc_AArch64MachObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=Fggk1ulAsA2sj9v7hId0l2AoCWUb87dcBF6qqC-biFU&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -33,7 +33,7 @@ public:<br>
AArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype)<br>
: MCMachObjectTargetWriter(true /* is64Bit */, CPUType, CPUSubtype) {}<br>
<br>
- void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
+ void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
const MCAsmLayout &Layout, const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue) override;<br>
@@ -139,7 +139,7 @@ static bool canUseLocalRelocation(const<br>
return false;<br>
}<br>
<br>
-void AArch64MachObjectWriter::RecordRelocation(<br>
+void AArch64MachObjectWriter::recordRelocation(<br>
MachObjectWriter *Writer, MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue) {<br>
@@ -313,7 +313,7 @@ void AArch64MachObjectWriter::RecordRelo<br>
Asm.getContext().reportFatalError(Fixup.getLoc(),<br>
"unable to resolve variable '" +<br>
Symbol->getName() + "'");<br>
- return RecordRelocation(Writer, Asm, Layout, Fragment, Fixup, Target,<br>
+ return recordRelocation(Writer, Asm, Layout, Fragment, Fixup, Target,<br>
FixedValue);<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_MCTargetDesc_ARMAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=dciXfNWafvLkP3D67fhKN0aTzXaglUnXnOvu2Hh8lPo&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -260,9 +260,9 @@ bool ARMAsmBackend::writeNopData(uint64_<br>
hasNOP() ? Thumb2_16bitNopEncoding : Thumb1_16bitNopEncoding;<br>
uint64_t NumNops = Count / 2;<br>
for (uint64_t i = 0; i != NumNops; ++i)<br>
- OW->Write16(nopEncoding);<br>
+ OW->write16(nopEncoding);<br>
if (Count & 1)<br>
- OW->Write8(0);<br>
+ OW->write8(0);<br>
return true;<br>
}<br>
// ARM mode<br>
@@ -270,21 +270,21 @@ bool ARMAsmBackend::writeNopData(uint64_<br>
hasNOP() ? ARMv6T2_NopEncoding : ARMv4_NopEncoding;<br>
uint64_t NumNops = Count / 4;<br>
for (uint64_t i = 0; i != NumNops; ++i)<br>
- OW->Write32(nopEncoding);<br>
+ OW->write32(nopEncoding);<br>
// FIXME: should this function return false when unable to write exactly<br>
// 'Count' bytes with NOP encodings?<br>
switch (Count % 4) {<br>
default:<br>
break; // No leftover bytes to write<br>
case 1:<br>
- OW->Write8(0);<br>
+ OW->write8(0);<br>
break;<br>
case 2:<br>
- OW->Write16(0);<br>
+ OW->write16(0);<br>
break;<br>
case 3:<br>
- OW->Write16(0);<br>
- OW->Write8(0xa0);<br>
+ OW->write16(0);<br>
+ OW->write8(0xa0);<br>
break;<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_ARM_MCTargetDesc_ARMMachObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=EUaij7a31rJsisacpx7EoPcJywU1RJAno93tDUpsca8&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -52,7 +52,7 @@ public:<br>
ARMMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)<br>
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}<br>
<br>
- void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
+ void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
const MCAsmLayout &Layout, const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue) override;<br>
@@ -338,7 +338,7 @@ bool ARMMachObjectWriter::requiresExtern<br>
return false;<br>
}<br>
<br>
-void ARMMachObjectWriter::RecordRelocation(MachObjectWriter *Writer,<br>
+void ARMMachObjectWriter::recordRelocation(MachObjectWriter *Writer,<br>
MCAssembler &Asm,<br>
const MCAsmLayout &Layout,<br>
const MCFragment *Fragment,<br>
<br>
Modified: llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_BPF_MCTargetDesc_BPFAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=GbzuYs6KkqFiUojXGoBSvB1mbzQ_dFqeuA3bvqyVkTo&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -57,7 +57,7 @@ bool BPFAsmBackend::writeNopData(uint64_<br>
return false;<br>
<br>
for (uint64_t i = 0; i < Count; i += 8)<br>
- OW->Write64(0x15000000);<br>
+ OW->write64(0x15000000);<br>
<br>
return true;<br>
}<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_PowerPC_MCTargetDesc_PPCAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=GIMPVrNoaCF05AWhcQeFYx60TPIpjNk50qP9LjOhIxs&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -177,7 +177,7 @@ public:<br>
bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override {<br>
uint64_t NumNops = Count / 4;<br>
for (uint64_t i = 0; i != NumNops; ++i)<br>
- OW->Write32(0x60000000);<br>
+ OW->write32(0x60000000);<br>
<br>
OW->WriteZeros(Count % 4);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_PowerPC_MCTargetDesc_PPCMachObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=yUG23w3Ta91CB8UyFi6dVDqfasmAjMtZ7h7bxHonwFg&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -40,7 +40,7 @@ public:<br>
PPCMachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)<br>
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}<br>
<br>
- void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
+ void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
const MCAsmLayout &Layout, const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue) override {<br>
<br>
Modified: llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_R600_MCTargetDesc_AMDGPUAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=UxMNyjaJ1p0vot1fIJ0cmtVvLIbXMcsN5-p4mFuGqqA&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -29,14 +29,14 @@ public:<br>
const MCAsmLayout &Layout) override {<br>
//XXX: Implement if necessary.<br>
}<br>
- void RecordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
+ void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout,<br>
const MCFragment *Fragment, const MCFixup &Fixup,<br>
MCValue Target, bool &IsPCRel,<br>
uint64_t &FixedValue) override {<br>
assert(!"Not implemented");<br>
}<br>
<br>
- void WriteObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
+ void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override;<br>
<br>
};<br>
<br>
@@ -64,7 +64,7 @@ public:<br>
<br>
} //End anonymous namespace<br>
<br>
-void AMDGPUMCObjectWriter::WriteObject(MCAssembler &Asm,<br>
+void AMDGPUMCObjectWriter::writeObject(MCAssembler &Asm,<br>
const MCAsmLayout &Layout) {<br>
for (MCAssembler::iterator I = Asm.begin(), E = Asm.end(); I != E; ++I) {<br>
Asm.writeSectionData(&*I, Layout);<br>
<br>
Modified: llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_Sparc_MCTargetDesc_SparcAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=k-wMdO0Jt1Sw_HZe9P0zs0UPUCnyB8OFHKVY-rFa_EQ&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -260,7 +260,7 @@ namespace {<br>
<br>
uint64_t NumNops = Count / 4;<br>
for (uint64_t i = 0; i != NumNops; ++i)<br>
- OW->Write32(0x01000000);<br>
+ OW->write32(0x01000000);<br>
<br>
return true;<br>
}<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_SystemZ_MCTargetDesc_SystemZMCAsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=F_e_Dc2pn4gcwfYny9Oba22bWFvIz1jhA3239BoqMcg&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -105,7 +105,7 @@ void SystemZMCAsmBackend::applyFixup(con<br>
bool SystemZMCAsmBackend::writeNopData(uint64_t Count,<br>
MCObjectWriter *OW) const {<br>
for (uint64_t I = 0; I != Count; ++I)<br>
- OW->Write8(7);<br>
+ OW->write8(7);<br>
return true;<br>
}<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_X86_MCTargetDesc_X86AsmBackend.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=HmN9iFqAzU32YBOwf7o5CyWGC38NFGAJabHaTmvVS3E&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp Thu Jun 4 17:24:41 2015<br>
@@ -326,7 +326,7 @@ bool X86AsmBackend::writeNopData(uint64_<br>
// FIXME: We could generated something better than plain 0x90.<br>
if (!HasNopl) {<br>
for (uint64_t i = 0; i < Count; ++i)<br>
- OW->Write8(0x90);<br>
+ OW->write8(0x90);<br>
return true;<br>
}<br>
<br>
@@ -336,10 +336,10 @@ bool X86AsmBackend::writeNopData(uint64_<br>
const uint8_t ThisNopLength = (uint8_t) std::min(Count, MaxNopLength);<br>
const uint8_t Prefixes = ThisNopLength <= 10 ? 0 : ThisNopLength - 10;<br>
for (uint8_t i = 0; i < Prefixes; i++)<br>
- OW->Write8(0x66);<br>
+ OW->write8(0x66);<br>
const uint8_t Rest = ThisNopLength - Prefixes;<br>
for (uint8_t i = 0; i < Rest; i++)<br>
- OW->Write8(Nops[Rest - 1][i]);<br>
+ OW->write8(Nops[Rest - 1][i]);<br>
Count -= ThisNopLength;<br>
} while (Count != 0);<br>
<br>
<br>
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_Target_X86_MCTargetDesc_X86MachObjectWriter.cpp-3Frev-3D239108-26r1-3D239107-26r2-3D239108-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=AbGsVco9kSfo-NSN7BMagVU5b6vbx3PYIAdZnDgj68I&s=1ExowwZE4WoLtGxy9C6eXX4j00uXvTURP09dMTeB8Vc&e=" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp?rev=239108&r1=239107&r2=239108&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp Thu Jun 4 17:24:41 2015<br>
@@ -57,7 +57,7 @@ public:<br>
X86MachObjectWriter(bool Is64Bit, uint32_t CPUType, uint32_t CPUSubtype)<br>
: MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype) {}<br>
<br>
- void RecordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
+ void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm,<br>
const MCAsmLayout &Layout, const MCFragment *Fragment,<br>
const MCFixup &Fixup, MCValue Target,<br>
uint64_t &FixedValue) override {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>