diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 15:33:44 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 15:33:44 +0000 |
commit | b08c6df6787971502bd51e30b0f1038c1ea0dc2c (patch) | |
tree | fff4bf6f50736a6923207f162802aab711c8a5be /tools/llvm-readobj | |
parent | 05b96447ab27c394c6cc161ff9b2515ad673d74f (diff) | |
download | external_llvm-b08c6df6787971502bd51e30b0f1038c1ea0dc2c.zip external_llvm-b08c6df6787971502bd51e30b0f1038c1ea0dc2c.tar.gz external_llvm-b08c6df6787971502bd51e30b0f1038c1ea0dc2c.tar.bz2 |
Template MachOObjectFile over endianness too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r-- | tools/llvm-readobj/MachODumper.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index 3dad4d6..2073ddf 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -160,8 +160,8 @@ namespace { static void getSection(const MachOObjectFileBase *Obj, DataRefImpl DRI, MachOSection &Section) { - if (const MachOObjectFile<true> *O = dyn_cast<MachOObjectFile<true> >(Obj)) { - const MachOObjectFile<true>::Section *Sect = O->getSection(DRI); + if (const MachOObjectFile64Le *O = dyn_cast<MachOObjectFile64Le>(Obj)) { + const MachOObjectFile64Le::Section *Sect = O->getSection(DRI); Section.Address = Sect->Address; Section.Size = Sect->Size; @@ -173,8 +173,8 @@ static void getSection(const MachOObjectFileBase *Obj, Section.Reserved1 = Sect->Reserved1; Section.Reserved2 = Sect->Reserved2; } else { - const MachOObjectFile<false> *O2 = cast<MachOObjectFile<false> >(Obj); - const MachOObjectFile<false>::Section *Sect = O2->getSection(DRI); + const MachOObjectFile32Le *O2 = cast<MachOObjectFile32Le>(Obj); + const MachOObjectFile32Le::Section *Sect = O2->getSection(DRI); Section.Address = Sect->Address; Section.Size = Sect->Size; @@ -191,8 +191,8 @@ static void getSection(const MachOObjectFileBase *Obj, static void getSymbol(const MachOObjectFileBase *Obj, DataRefImpl DRI, MachOSymbol &Symbol) { - if (const MachOObjectFile<true> *O = dyn_cast<MachOObjectFile<true> >(Obj)) { - const MachOObjectFile<true>::SymbolTableEntry *Entry = + if (const MachOObjectFile64Le *O = dyn_cast<MachOObjectFile64Le>(Obj)) { + const MachOObjectFile64Le::SymbolTableEntry *Entry = O->getSymbolTableEntry(DRI); Symbol.StringIndex = Entry->StringIndex; Symbol.Type = Entry->Type; @@ -200,8 +200,8 @@ static void getSymbol(const MachOObjectFileBase *Obj, Symbol.Flags = Entry->Flags; Symbol.Value = Entry->Value; } else { - const MachOObjectFile<false> *O2 = cast<MachOObjectFile<false> >(Obj); - const MachOObjectFile<false>::SymbolTableEntry *Entry = + const MachOObjectFile32Le *O2 = cast<MachOObjectFile32Le>(Obj); + const MachOObjectFile32Le::SymbolTableEntry *Entry = O2->getSymbolTableEntry(DRI); Symbol.StringIndex = Entry->StringIndex; Symbol.Type = Entry->Type; |