diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-08 20:45:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-08 20:45:01 +0000 |
commit | c0406e162c041ea08e22e320da31d4a739ea7cfe (patch) | |
tree | d95dc355664939b7497340e4b149d0a41ce31ddc /llvm/tools/llvm-readobj/MachODumper.cpp | |
parent | c3aabcff6d6d97cefa0bebf315d19500d37fe81c (diff) | |
download | bcm5719-llvm-c0406e162c041ea08e22e320da31d4a739ea7cfe.tar.gz bcm5719-llvm-c0406e162c041ea08e22e320da31d4a739ea7cfe.zip |
Template the MachO types over the word size.
llvm-svn: 179051
Diffstat (limited to 'llvm/tools/llvm-readobj/MachODumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/MachODumper.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/tools/llvm-readobj/MachODumper.cpp b/llvm/tools/llvm-readobj/MachODumper.cpp index 190baa229b5..89402808bfe 100644 --- a/llvm/tools/llvm-readobj/MachODumper.cpp +++ b/llvm/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<true> *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<false> *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<true> *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<false> *Entry = + Obj->getSymbolTableEntry(DRI); Symbol.StringIndex = Entry->StringIndex; Symbol.Type = Entry->Type; Symbol.SectionIndex = Entry->SectionIndex; |