diff options
Diffstat (limited to 'tools/macho-dump/macho-dump.cpp')
-rw-r--r-- | tools/macho-dump/macho-dump.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/macho-dump/macho-dump.cpp b/tools/macho-dump/macho-dump.cpp index 760097974dbd..604f93adfbbf 100644 --- a/tools/macho-dump/macho-dump.cpp +++ b/tools/macho-dump/macho-dump.cpp @@ -300,12 +300,12 @@ DumpDataInCodeDataCommand(const MachOObjectFile &Obj, static int DumpLinkerOptionsCommand(const MachOObjectFile &Obj, const MachOObjectFile::LoadCommandInfo &LCI) { - MachO::linker_options_command LOLC = Obj.getLinkerOptionsLoadCommand(LCI); + MachO::linker_option_command LOLC = Obj.getLinkerOptionLoadCommand(LCI); outs() << " ('count', " << LOLC.count << ")\n" << " ('_strings', [\n"; - uint64_t DataSize = LOLC.cmdsize - sizeof(MachO::linker_options_command); - const char *P = LCI.Ptr + sizeof(MachO::linker_options_command); + uint64_t DataSize = LOLC.cmdsize - sizeof(MachO::linker_option_command); + const char *P = LCI.Ptr + sizeof(MachO::linker_option_command); StringRef Data(P, DataSize); for (unsigned i = 0; i != LOLC.count; ++i) { std::pair<StringRef,StringRef> Split = Data.split('\0'); @@ -324,7 +324,7 @@ DumpVersionMin(const MachOObjectFile &Obj, const MachOObjectFile::LoadCommandInfo &LCI) { MachO::version_min_command VMLC = Obj.getVersionMinLoadCommand(LCI); outs() << " ('version, " << VMLC.version << ")\n" - << " ('reserved, " << VMLC.reserved << ")\n"; + << " ('sdk, " << VMLC.sdk << ")\n"; return 0; } @@ -356,7 +356,7 @@ static int DumpLoadCommand(const MachOObjectFile &Obj, return DumpLinkeditDataCommand(Obj, LCI); case MachO::LC_DATA_IN_CODE: return DumpDataInCodeDataCommand(Obj, LCI); - case MachO::LC_LINKER_OPTIONS: + case MachO::LC_LINKER_OPTION: return DumpLinkerOptionsCommand(Obj, LCI); case MachO::LC_VERSION_MIN_IPHONEOS: case MachO::LC_VERSION_MIN_MACOSX: @@ -403,12 +403,12 @@ int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, "llvm Mach-O dumping tool\n"); - ErrorOr<Binary *> BinaryOrErr = createBinary(InputFile); + ErrorOr<OwningBinary<Binary>> BinaryOrErr = createBinary(InputFile); if (std::error_code EC = BinaryOrErr.getError()) return Error("unable to read input: '" + EC.message() + "'"); - std::unique_ptr<Binary> Binary(BinaryOrErr.get()); + Binary &Binary = *BinaryOrErr.get().getBinary(); - const MachOObjectFile *InputObject = dyn_cast<MachOObjectFile>(Binary.get()); + const MachOObjectFile *InputObject = dyn_cast<MachOObjectFile>(&Binary); if (!InputObject) return Error("Not a MachO object"); |