Switch from WriteEFlags to getEFlags in preparation for moving it

to Target/.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147087 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-12-21 20:09:46 +00:00
parent a2a98fd0dd
commit e8526d030f
2 changed files with 8 additions and 9 deletions

View File

@@ -108,7 +108,7 @@ void ELFObjectWriter::WriteHeader(uint64_t SectionDataSize,
sizeof(ELF::Elf32_Ehdr))); // e_shoff = sec hdr table off in bytes sizeof(ELF::Elf32_Ehdr))); // e_shoff = sec hdr table off in bytes
// e_flags = whatever the target wants // e_flags = whatever the target wants
WriteEFlags(); Write32(getEFlags());
// e_ehsize = ELF header size // e_ehsize = ELF header size
Write16(is64Bit() ? sizeof(ELF::Elf64_Ehdr) : sizeof(ELF::Elf32_Ehdr)); Write16(is64Bit() ? sizeof(ELF::Elf64_Ehdr) : sizeof(ELF::Elf32_Ehdr));
@@ -1296,8 +1296,8 @@ ARMELFObjectWriter::~ARMELFObjectWriter()
{} {}
// FIXME: get the real EABI Version from the Triple. // FIXME: get the real EABI Version from the Triple.
void ARMELFObjectWriter::WriteEFlags() { unsigned ARMELFObjectWriter::getEFlags() {
Write32(ELF::EF_ARM_EABIMASK & DefaultEABIVersion); return ELF::EF_ARM_EABIMASK & DefaultEABIVersion;
} }
// In ARM, _MergedGlobals and other most symbols get emitted directly. // In ARM, _MergedGlobals and other most symbols get emitted directly.
@@ -1646,9 +1646,8 @@ MipsELFObjectWriter::MipsELFObjectWriter(MCELFObjectTargetWriter *MOTW,
MipsELFObjectWriter::~MipsELFObjectWriter() {} MipsELFObjectWriter::~MipsELFObjectWriter() {}
// FIXME: get the real EABI Version from the Triple. // FIXME: get the real EABI Version from the Triple.
void MipsELFObjectWriter::WriteEFlags() { unsigned MipsELFObjectWriter::getEFlags() {
Write32(ELF::EF_MIPS_NOREORDER | return ELF::EF_MIPS_NOREORDER | ELF::EF_MIPS_ARCH_32R2;
ELF::EF_MIPS_ARCH_32R2);
} }
const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm, const MCSymbol *MipsELFObjectWriter::ExplicitRelSym(const MCAssembler &Asm,

View File

@@ -244,7 +244,7 @@ class ELFObjectWriter : public MCObjectWriter {
unsigned NumberOfSections); unsigned NumberOfSections);
/// Default e_flags = 0 /// Default e_flags = 0
virtual void WriteEFlags() { Write32(0); } virtual unsigned getEFlags() { return 0; }
virtual void WriteSymbolEntry(MCDataFragment *SymtabF, virtual void WriteSymbolEntry(MCDataFragment *SymtabF,
MCDataFragment *ShndxF, MCDataFragment *ShndxF,
@@ -369,7 +369,7 @@ class ELFObjectWriter : public MCObjectWriter {
virtual ~ARMELFObjectWriter(); virtual ~ARMELFObjectWriter();
virtual void WriteEFlags(); virtual unsigned getEFlags();
protected: protected:
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm, virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,
const MCValue &Target, const MCValue &Target,
@@ -425,7 +425,7 @@ class ELFObjectWriter : public MCObjectWriter {
bool IsLittleEndian); bool IsLittleEndian);
virtual ~MipsELFObjectWriter(); virtual ~MipsELFObjectWriter();
virtual void WriteEFlags(); virtual unsigned getEFlags();
protected: protected:
virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm, virtual const MCSymbol *ExplicitRelSym(const MCAssembler &Asm,