diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 03:48:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-10 03:48:25 +0000 |
commit | a2561a0153237291980722383f409a6499b12efc (patch) | |
tree | 4626dff1b1c7fb3b694c460de6c22692c535ad45 /tools | |
parent | 774e7c82a84189a1f8194a63dc8040136ca6b4d8 (diff) | |
download | external_llvm-a2561a0153237291980722383f409a6499b12efc.zip external_llvm-a2561a0153237291980722383f409a6499b12efc.tar.gz external_llvm-a2561a0153237291980722383f409a6499b12efc.tar.bz2 |
Template the MachO types over endianness.
For now they are still only used as little endian.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179147 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index b0a1aca..d1e7d69 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -199,7 +199,7 @@ static void emitDOTFile(const char *FileName, const MCFunction &f, Out << "}\n"; } -static void getSectionsAndSymbols(const MachOFormat::Header *Header, +static void getSectionsAndSymbols(const MachOObjectFileBase::Header *Header, MachOObjectFileBase *MachOObj, std::vector<SectionRef> &Sections, std::vector<SymbolRef> &Symbols, @@ -218,12 +218,13 @@ static void getSectionsAndSymbols(const MachOFormat::Header *Header, } for (unsigned i = 0; i != Header->NumLoadCommands; ++i) { - const MachOFormat::LoadCommand *Command = MachOObj->getLoadCommandInfo(i); + const MachOObjectFileBase::LoadCommand *Command = + MachOObj->getLoadCommandInfo(i); if (Command->Type == macho::LCT_FunctionStarts) { // We found a function starts segment, parse the addresses for later // consumption. - const MachOFormat::LinkeditDataLoadCommand *LLC = - reinterpret_cast<const MachOFormat::LinkeditDataLoadCommand*>(Command); + const MachOObjectFileBase::LinkeditDataLoadCommand *LLC = + reinterpret_cast<const MachOObjectFileBase::LinkeditDataLoadCommand*>(Command); MachOObj->ReadULEB128s(LLC->DataOffset, FoundFns); } @@ -269,7 +270,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) { outs() << '\n' << Filename << ":\n\n"; - const MachOFormat::Header *Header = MachOOF->getHeader(); + const MachOObjectFileBase::Header *Header = MachOOF->getHeader(); std::vector<SectionRef> Sections; std::vector<SymbolRef> Symbols; |