From 335f1d46d82a4d6b5a7317ccc73178a47b62fc25 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 8 Apr 2013 20:45:01 +0000 Subject: Template the MachO types over the word size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179051 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-readobj/MachODumper.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tools/llvm-readobj') diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index 190baa2..8940280 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -161,7 +161,7 @@ static void getSection(const MachOObjectFile *Obj, DataRefImpl DRI, MachOSection &Section) { if (Obj->is64Bit()) { - const MachOFormat::Section64 *Sect = Obj->getSection64(DRI); + const MachOFormat::Section *Sect = Obj->getSection64(DRI); Section.Address = Sect->Address; Section.Size = Sect->Size; @@ -173,7 +173,7 @@ static void getSection(const MachOObjectFile *Obj, Section.Reserved1 = Sect->Reserved1; Section.Reserved2 = Sect->Reserved2; } else { - const MachOFormat::Section *Sect = Obj->getSection(DRI); + const MachOFormat::Section *Sect = Obj->getSection(DRI); Section.Address = Sect->Address; Section.Size = Sect->Size; @@ -191,15 +191,16 @@ static void getSymbol(const MachOObjectFile *Obj, DataRefImpl DRI, MachOSymbol &Symbol) { if (Obj->is64Bit()) { - const MachOFormat::Symbol64TableEntry *Entry = - Obj->getSymbol64TableEntry( DRI); + const MachOFormat::SymbolTableEntry *Entry = + Obj->getSymbol64TableEntry(DRI); Symbol.StringIndex = Entry->StringIndex; Symbol.Type = Entry->Type; Symbol.SectionIndex = Entry->SectionIndex; Symbol.Flags = Entry->Flags; Symbol.Value = Entry->Value; } else { - const MachOFormat::SymbolTableEntry *Entry = Obj->getSymbolTableEntry(DRI); + const MachOFormat::SymbolTableEntry *Entry = + Obj->getSymbolTableEntry(DRI); Symbol.StringIndex = Entry->StringIndex; Symbol.Type = Entry->Type; Symbol.SectionIndex = Entry->SectionIndex; -- cgit v1.1