Convert MachOObjectFile to a template.

For now it is templated only on being 64 or 32 bits. I will add little/big
endian next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179097 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp
index 7c65658..b0a1aca 100644
--- a/tools/llvm-objdump/MachODump.cpp
+++ b/tools/llvm-objdump/MachODump.cpp
@@ -52,7 +52,7 @@
 static cl::opt<std::string>
   DSYMFile("dsym", cl::desc("Use .dSYM file for debug info"));
 
-static const Target *GetTarget(const MachOObjectFile *MachOObj) {
+static const Target *GetTarget(const MachOObjectFileBase *MachOObj) {
   // Figure out the target triple.
   if (TripleName.empty()) {
     llvm::Triple TT("unknown-unknown-unknown");
@@ -108,7 +108,7 @@
 
 // Print additional information about an address, if available.
 static void DumpAddress(uint64_t Address, ArrayRef<SectionRef> Sections,
-                        const MachOObjectFile *MachOObj, raw_ostream &OS) {
+                        const MachOObjectFileBase *MachOObj, raw_ostream &OS) {
   for (unsigned i = 0; i != Sections.size(); ++i) {
     uint64_t SectAddr = 0, SectSize = 0;
     Sections[i].getAddress(SectAddr);
@@ -200,7 +200,7 @@
 }
 
 static void getSectionsAndSymbols(const MachOFormat::Header *Header,
-                                  MachOObjectFile *MachOObj,
+                                  MachOObjectFileBase *MachOObj,
                                   std::vector<SectionRef> &Sections,
                                   std::vector<SymbolRef> &Symbols,
                                   SmallVectorImpl<uint64_t> &FoundFns) {
@@ -238,7 +238,7 @@
     return;
   }
 
-  OwningPtr<MachOObjectFile> MachOOF(static_cast<MachOObjectFile*>(
+  OwningPtr<MachOObjectFileBase> MachOOF(static_cast<MachOObjectFileBase*>(
         ObjectFile::createMachOObjectFile(Buff.take())));
 
   const Target *TheTarget = GetTarget(MachOOF.get());