Tidy up. 80 columns.

llvm-svn: 144649
This commit is contained in:
Jim Grosbach 2011-11-15 16:46:22 +00:00
parent a2f57dee6d
commit 176025e803
5 changed files with 33 additions and 27 deletions

View File

@ -1579,8 +1579,8 @@ unsigned PPCELFObjectWriter::GetRelocType(const MCValue &Target,
return Type;
}
void
PPCELFObjectWriter::adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) {
void PPCELFObjectWriter::
adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) {
switch ((unsigned)Fixup.getKind()) {
case PPC::fixup_ppc_ha16:
case PPC::fixup_ppc_lo16:

View File

@ -240,33 +240,38 @@ class ELFObjectWriter : public MCObjectWriter {
F.getContents() += StringRef(buf, 8);
}
virtual void WriteHeader(uint64_t SectionDataSize, unsigned NumberOfSections);
virtual void WriteHeader(uint64_t SectionDataSize,
unsigned NumberOfSections);
/// Default e_flags = 0
virtual void WriteEFlags() { Write32(0); }
virtual void WriteSymbolEntry(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
uint64_t name, uint8_t info,
uint64_t value, uint64_t size,
uint8_t other, uint32_t shndx,
bool Reserved);
virtual void WriteSymbolEntry(MCDataFragment *SymtabF,
MCDataFragment *ShndxF,
uint64_t name, uint8_t info,
uint64_t value, uint64_t size,
uint8_t other, uint32_t shndx,
bool Reserved);
virtual void WriteSymbol(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
ELFSymbolData &MSD,
const MCAsmLayout &Layout);
typedef DenseMap<const MCSectionELF*, uint32_t> SectionIndexMapTy;
virtual void WriteSymbolTable(MCDataFragment *SymtabF, MCDataFragment *ShndxF,
const MCAssembler &Asm,
const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap);
virtual void WriteSymbolTable(MCDataFragment *SymtabF,
MCDataFragment *ShndxF,
const MCAssembler &Asm,
const MCAsmLayout &Layout,
const SectionIndexMapTy &SectionIndexMap);
virtual void RecordRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout,
const MCFragment *Fragment, const MCFixup &Fixup,
virtual void RecordRelocation(const MCAssembler &Asm,
const MCAsmLayout &Layout,
const MCFragment *Fragment,
const MCFixup &Fixup,
MCValue Target, uint64_t &FixedValue);
virtual uint64_t getSymbolIndexInSymbolTable(const MCAssembler &Asm,
const MCSymbol *S);
const MCSymbol *S);
// Map from a group section to the signature symbol
typedef DenseMap<const MCSectionELF*, const MCSymbol*> GroupMapTy;
@ -347,7 +352,8 @@ class ELFObjectWriter : public MCObjectWriter {
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
int64_t Addend) = 0;
virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset) { }
virtual void adjustFixupOffset(const MCFixup &Fixup,
uint64_t &RelocOffset) {}
};
//===- X86ELFObjectWriter -------------------------------------------===//

View File

@ -205,10 +205,10 @@ void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
if (MCELF::GetBinding(SD) == ELF_STB_Local) {
const MCSection *Section = getAssembler().getContext().getELFSection(".bss",
ELF::SHT_NOBITS,
ELF::SHF_WRITE |
ELF::SHF_ALLOC,
SectionKind::getBSS());
ELF::SHT_NOBITS,
ELF::SHF_WRITE |
ELF::SHF_ALLOC,
SectionKind::getBSS());
Symbol->setSection(*Section);
struct LocalCommon L = {&SD, Size, ByteAlignment};

View File

@ -1,4 +1,4 @@
//===- lib/MC/MCModule.cpp - MCModule implementation --------------------------===//
//===- lib/MC/MCModule.cpp - MCModule implementation ----------------------===//
//
// The LLVM Compiler Infrastructure
//

View File

@ -56,8 +56,8 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
TLSThreadInitSection
= Ctx->getMachOSection("__DATA", "__thread_init",
MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
SectionKind::getDataRel());
MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
SectionKind::getDataRel());
CStringSection // .cstring
= Ctx->getMachOSection("__TEXT", "__cstring",
@ -221,8 +221,8 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
if (T.getArch() == Triple::x86) {
PersonalityEncoding = (RelocM == Reloc::PIC_)
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
LSDAEncoding = (RelocM == Reloc::PIC_)
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
@ -230,8 +230,8 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
TTypeEncoding = (RelocM == Reloc::PIC_)
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
: dwarf::DW_EH_PE_absptr;
} else if (T.getArch() == Triple::x86_64) {
FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;