summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-07 19:26:57 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-07 19:26:57 +0000
commit433611bdf395d08093e3edd52846c1774b46caf2 (patch)
tree5ff522eef783fb823a3aacb143a7341ca4971890 /tools
parent18fdb398ea94c7ddee40bec49f63491922c5b110 (diff)
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')
-rw-r--r--tools/llvm-objdump/MachODump.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp
index 9275fe147a..7c6565832e 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;