diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-07 19:26:57 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-07 19:26:57 +0000 |
commit | 433611bdf395d08093e3edd52846c1774b46caf2 (patch) | |
tree | 5ff522eef783fb823a3aacb143a7341ca4971890 /tools/llvm-objdump | |
parent | 18fdb398ea94c7ddee40bec49f63491922c5b110 (diff) | |
download | external_llvm-433611bdf395d08093e3edd52846c1774b46caf2.zip external_llvm-433611bdf395d08093e3edd52846c1774b46caf2.tar.gz external_llvm-433611bdf395d08093e3edd52846c1774b46caf2.tar.bz2 |
Implement MachOObjectFile::getHeader directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index 9275fe1..7c65658 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -56,7 +56,7 @@ static const Target *GetTarget(const MachOObjectFile *MachOObj) { // Figure out the target triple. if (TripleName.empty()) { llvm::Triple TT("unknown-unknown-unknown"); - switch (MachOObj->getHeader().CPUType) { + switch (MachOObj->getHeader()->CPUType) { case llvm::MachO::CPUTypeI386: TT.setArch(Triple::ArchType(Triple::x86)); break; @@ -199,7 +199,7 @@ static void emitDOTFile(const char *FileName, const MCFunction &f, Out << "}\n"; } -static void getSectionsAndSymbols(const macho::Header &Header, +static void getSectionsAndSymbols(const MachOFormat::Header *Header, MachOObjectFile *MachOObj, std::vector<SectionRef> &Sections, std::vector<SymbolRef> &Symbols, @@ -217,7 +217,7 @@ static void getSectionsAndSymbols(const macho::Header &Header, Sections.push_back(*SI); } - for (unsigned i = 0; i != Header.NumLoadCommands; ++i) { + for (unsigned i = 0; i != Header->NumLoadCommands; ++i) { const MachOFormat::LoadCommand *Command = MachOObj->getLoadCommandInfo(i); if (Command->Type == macho::LCT_FunctionStarts) { // We found a function starts segment, parse the addresses for later @@ -269,7 +269,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) { outs() << '\n' << Filename << ":\n\n"; - const macho::Header &Header = MachOOF->getHeader(); + const MachOFormat::Header *Header = MachOOF->getHeader(); std::vector<SectionRef> Sections; std::vector<SymbolRef> Symbols; |