COFF: Rename writeHeader -> writeHeaderTo.

Chunk has writeTo function which takes uint8_t *Buf.
writeHeaderTo feels more consistent with that because this member
function also takes uint8_t *Buf.

llvm-svn: 239236
This commit is contained in:
Rui Ueyama 2015-06-06 23:19:38 +00:00
parent 929d8c52b1
commit cc608e4f35
2 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ void OutputSection::addPermissions(uint32_t C) {
} }
// Write the section header to a given buffer. // Write the section header to a given buffer.
void OutputSection::writeHeader(uint8_t *Buf) { void OutputSection::writeHeaderTo(uint8_t *Buf) {
auto *Hdr = reinterpret_cast<coff_section *>(Buf); auto *Hdr = reinterpret_cast<coff_section *>(Buf);
*Hdr = Header; *Hdr = Header;
if (StringTableOff) { if (StringTableOff) {
@ -275,7 +275,7 @@ void Writer::writeHeader() {
// Write section table // Write section table
for (OutputSection *Sec : OutputSections) { for (OutputSection *Sec : OutputSections) {
Sec->writeHeader(Buf); Sec->writeHeaderTo(Buf);
Buf += sizeof(coff_section); Buf += sizeof(coff_section);
} }

View File

@ -43,7 +43,7 @@ public:
uint32_t getCharacteristics() { return Header.Characteristics; } uint32_t getCharacteristics() { return Header.Characteristics; }
uint64_t getRVA() { return Header.VirtualAddress; } uint64_t getRVA() { return Header.VirtualAddress; }
uint64_t getFileOff() { return Header.PointerToRawData; } uint64_t getFileOff() { return Header.PointerToRawData; }
void writeHeader(uint8_t *Buf); void writeHeaderTo(uint8_t *Buf);
// Returns the size of this section in an executable memory image. // Returns the size of this section in an executable memory image.
// This may be smaller than the raw size (the raw size is multiple // This may be smaller than the raw size (the raw size is multiple