git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244300
91177308-0d34-0410-b5e6-
96231b3b80d8
std::stable_sort(Libs.begin(), Libs.end());
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) {
/// @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)
if (std::error_code EC = ChildOrErr.getError()) {
// Ignore non-object files.
if (EC != object_error::invalid_file_type)