aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-08 20:45:01 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-08 20:45:01 +0000
commit335f1d46d82a4d6b5a7317ccc73178a47b62fc25 (patch)
tree223569cba3b0f6c633a93b65573bc5f4b1561a29 /tools/llvm-readobj
parenta9408bafcc4ea0a42f9dd7a251845372d64abb8b (diff)
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
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/MachODumper.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp
index 190baa229b..89402808bf 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<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;