std::stable_sort(Libs.begin(), Libs.end());
- for (LibsTy::const_iterator I = Libs.begin(), E = Libs.end(); I != E; ++I) {
- outs() << " " << *I << "\n";
+ for (const auto &L : Libs) {
+ outs() << " " << L << "\n";
}
}
/// @brief Dumps each object file in \a Arc;
static void dumpArchive(const Archive *Arc) {
- for (Archive::child_iterator ArcI = Arc->child_begin(),
- ArcE = Arc->child_end();
- ArcI != ArcE; ++ArcI) {
- ErrorOr<std::unique_ptr<Binary>> ChildOrErr = ArcI->getAsBinary();
+ for (const auto &Child : Arc->children()) {
+ ErrorOr<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
if (std::error_code EC = ChildOrErr.getError()) {
// Ignore non-object files.
if (EC != object_error::invalid_file_type)