errs() << ToolName << ": " << file << ": " << EC.message() << ".\n";
return;
}
- std::unique_ptr<Binary> binary = std::move(BinaryOrErr.get());
+ Binary &Bin = *BinaryOrErr.get();
- if (Archive *a = dyn_cast<Archive>(binary.get())) {
+ if (Archive *a = dyn_cast<Archive>(&Bin)) {
// This is an archive. Iterate over each member and display its sizes.
for (object::Archive::child_iterator i = a->child_begin(),
e = a->child_end();
}
}
} else if (MachOUniversalBinary *UB =
- dyn_cast<MachOUniversalBinary>(binary.get())) {
+ dyn_cast<MachOUniversalBinary>(&Bin)) {
// If we have a list of architecture flags specified dump only those.
if (!ArchAll && ArchFlags.size() != 0) {
// Look for a slice in the universal binary that matches each ArchFlag.
}
}
}
- } else if (ObjectFile *o = dyn_cast<ObjectFile>(binary.get())) {
+ } else if (ObjectFile *o = dyn_cast<ObjectFile>(&Bin)) {
if (!checkMachOAndArchFlags(o, file))
return;
if (OutputFormat == sysv)